Announcement

Collapse
No announcement yet.

Applescript?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #2
    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?
    Originally posted by ghettocruzer
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

    Comment


    • #3
      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.

      Comment


      • #4
        i cant find this app...do i have to install xcode by chance?

        Comment


        • #5
          i may have found it...is this it http://www.apple.com/applescript/uiscripting/02.html

          Comment


          • #6
            That's it. UI elements inspector.
            Originally posted by ghettocruzer
            I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
            Want to:
            -Find out about the new iBug iPad install?
            -Find out about carPC's in just 5 minutes? View the Car PC 101 video

            Comment


            • #7
              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?

              Comment


              • #8
                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.
                Originally posted by ghettocruzer
                I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                Want to:
                -Find out about the new iBug iPad install?
                -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                Comment


                • #9
                  ok thanks...i'll look into it. You dont happen to have that applescript to control jxm around anymore do you?

                  Comment


                  • #10
                    Sure. PM me your email and I'll send it to you.
                    Originally posted by ghettocruzer
                    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                    Want to:
                    -Find out about the new iBug iPad install?
                    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                    Comment


                    • #11
                      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.

                      Comment


                      • #12
                        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.
                        Originally posted by ghettocruzer
                        I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                        Want to:
                        -Find out about the new iBug iPad install?
                        -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                        Comment


                        • #13
                          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.

                          Comment


                          • #14
                            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.
                            Originally posted by ghettocruzer
                            I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
                            Want to:
                            -Find out about the new iBug iPad install?
                            -Find out about carPC's in just 5 minutes? View the Car PC 101 video

                            Comment


                            • #15
                              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

                              Comment

                              Working...
                              X