The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > MacCar

Reply
 
Thread Tools Display Modes
Old 03-10-2008, 10:53 PM   #1
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
Applescript?

Is there a way to have jxm open at when I open line in on my computer. I know I could probably use automater but I just want to to see if there was a better way. Also, I would like to some how be able to push the pass thru button on line in and at the same time it would turn the power on in jxm. Can I write a simple applescript to do this, and how would I get it to run everytime I pushed the pass thru button. Or maybe create a separate button that would before both actions, and even open the programs if they r not already.

Last edited by super-fly : 03-10-2008 at 10:59 PM.
super-fly is offline   Reply With Quote
Sponsored Links
Old 03-10-2008, 11:55 PM   #2
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
You can script the user interface. You have to figure out the name of the control. There is an inspector app you can use on the apple developers web site.

I thought JXM has an error in it that keeps it from working right -it hasn't been updated in quite awhile?
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 03-11-2008, 07:41 AM   #3
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
jxm seems to be getting updated...macxm is not. People were having problems with it working in leopard and the developer fixed it temporarily and said there would be a more permanent fix in the next version. Thanks for the reply...i'll take a look.
super-fly is offline   Reply With Quote
Old 03-11-2008, 07:59 AM   #4
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
i cant find this app...do i have to install xcode by chance?
super-fly is offline   Reply With Quote
Old 03-11-2008, 08:24 AM   #5
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
i may have found it...is this it http://www.apple.com/applescript/uiscripting/02.html
super-fly is offline   Reply With Quote
Old 03-11-2008, 09:06 AM   #6
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
That's it. UI elements inspector.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 03-11-2008, 09:20 AM   #7
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
ok i have a working script now...is there a way I can make it a button or something? I guess i could just save it as an application and run it...i just figured it would be easier like if i had a call to be able to push a button. My next thing is trying to make jxm more car friendly as far as for changing stations etc...any suggestions?
super-fly is offline   Reply With Quote
Old 03-11-2008, 09:28 AM   #8
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
You can have applescript pop up a button for you to do stuff. You can also build an Applescript application in XCode and have your own interface that can control JXM. I did something similar with a friend awhile back.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 03-11-2008, 01:05 PM   #9
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
ok thanks...i'll look into it. You dont happen to have that applescript to control jxm around anymore do you?
super-fly is offline   Reply With Quote
Old 03-11-2008, 04:13 PM   #10
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
Sure. PM me your email and I'll send it to you.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Sponsored Links
Old 03-11-2008, 08:11 PM   #11
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
I originally wrote the script to delay 2 because it was trying to click power on jxm before it was open and it was causing an error. Instead i figured a better way would be to check to see if the window was open and if it was then to click it. I wrote this:
Code:
set x to 0 repeat until x = 1 if exists window "JXM" then set x to 1 tell process "JXM" tell window "JXM" click checkbox "Power" end tell end tell end if end repeat

It seems to be getting stuck in a loop though.
super-fly is offline   Reply With Quote
Old 03-12-2008, 01:31 AM   #12
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
You can also tell your applescript to launch JXM, then save the script as an app and just launch the script. It would open JXM and turn it on for you.

If you build your applescript as an application in XCode, you can set your own plist values to remember which channel you were last on and so forth.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 03-12-2008, 02:31 AM   #13
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
i did tell it to do that....the whole script lauches line in and launches jxm, then hides line in as well as pushes passthru and then pushes power on jxm. That was only a piece of my code. I was just trying to get the computer to check to make sure jxm was open before attemping to power it on. I was running into a problem because it would try and power it on and there was a sliht delay before it was open so i was getting an error. The above code seems to be stuck in a loop though. Thanks again.
super-fly is offline   Reply With Quote
Old 03-12-2008, 08:00 AM   #14
Admin. Don't bug or I'll byte.
Bugbyte's CarPC Specs
 
Bugbyte's Avatar
 
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
My Photos: (19)
If it is stuck in a loop, you probably aren't getting the name of the window right. You may have to use something like "Window 1" instead of "JXM".

You can print the results of the check (true/false) to the console in XCode but I'm not sure if you can in AS scripter. Maybe record your actions as a script and it will tell you what the name is.
__________________
-Where in the world is the iBug?
-Find out about theiBug
-Attention Newbies! Have you seen the FAQ Emporium?
-No time to figure it out? Take 5 minutes to view the Car PC 101 video
Bugbyte is offline   Reply With Quote
Old 03-12-2008, 08:13 AM   #15
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
My Photos: (9)
you were right the name of the window is wrong, but recording my actions doesnt give me the right name. btw...i pm'ed u...did u get it
super-fly is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Harmony - Mac Front End Worklog Bugbyte MacCar 181 02-23-2007 12:19 PM
NMEA extraction AppleScript need help zapwizard MacCar 15 05-05-2006 01:10 AM
Annoucing iKarr jdkarr01 MacCar 86 01-05-2006 12:15 AM
iDash progress thecapitalizt MacCar 78 12-27-2005 09:39 PM
AppleScript Resorces? iwakura MacCar 4 01-22-2005 07:37 PM


All times are GMT -5. The time now is 05:24 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics