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.
|
03-10-2008, 10:53 PM
|
#1
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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.
|
|
|
03-10-2008, 11:55 PM
|
#2
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
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?
|
|
|
03-11-2008, 07:41 AM
|
#3
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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.
|
|
|
03-11-2008, 07:59 AM
|
#4
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
i cant find this app...do i have to install xcode by chance?
|
|
|
03-11-2008, 08:24 AM
|
#5
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
|
|
|
03-11-2008, 09:06 AM
|
#6
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
That's it. UI elements inspector.
|
|
|
03-11-2008, 09:20 AM
|
#7
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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?
|
|
|
03-11-2008, 09:28 AM
|
#8
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
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.
|
|
|
03-11-2008, 01:05 PM
|
#9
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
ok thanks...i'll look into it. You dont happen to have that applescript to control jxm around anymore do you?
|
|
|
03-11-2008, 04:13 PM
|
#10
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
Sure. PM me your email and I'll send it to you.
|
|
|
03-11-2008, 08:11 PM
|
#11
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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.
|
|
|
03-12-2008, 01:31 AM
|
#12
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
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.
|
|
|
03-12-2008, 02:31 AM
|
#13
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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.
|
|
|
03-12-2008, 08:00 AM
|
#14
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Vehicle: 2001 VW Beetle
Posts: 4,464
|
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.
|
|
|
03-12-2008, 08:13 AM
|
#15
|
|
Constant Bitrate
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 187
|
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
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
|