Comments on: More Control with version 1/2 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/ hot bits and bytes Sun, 18 May 2008 10:50:06 +0000 http://wordpress.org/?v=2.2.1 By: Download Revelation Ringtone http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-186 Download Revelation Ringtone Tue, 18 Jul 2006 11:58:49 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-186 <p><strong>Download Revelation Ringtone...</strong></p> <p>Hear the ringtone of the popular song: Download Revelation ...</p> Download Revelation Ringtone…

Hear the ringtone of the popular song: Download Revelation …

]]>
By: martin http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-103 martin Mon, 05 Jun 2006 13:45:38 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-103 <p>Stay tuned. In less than 48 hours there will be a new version. The first of Sofa Control. It includes a fix for your problem.</p> Stay tuned. In less than 48 hours there will be a new version. The first of Sofa Control.
It includes a fix for your problem.

]]>
By: Ian http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-102 Ian Mon, 05 Jun 2006 13:38:22 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-102 <p>I tried copying and renaming the Adobe Reader app, but it still didn't get recognized. I noticed in the script that all the instances of "tell application" were directed at System Events, not Adobe Reader. I added "tell application "Adobe Reader" (* hello world *) end tell" to the script, and it allowed me to enable it, but gave me an error message.</p> <p>Adobe sux, but it is the only PDF reader with decent full-screen support. I will keep poking, but additional hints always appreciated!</p> I tried copying and renaming the Adobe Reader app, but it still didn’t get recognized. I noticed in the script that all the instances of “tell application” were directed at System Events, not Adobe Reader. I added “tell application “Adobe Reader” (* hello world *) end tell” to the script, and it allowed me to enable it, but gave me an error message.

Adobe sux, but it is the only PDF reader with decent full-screen support. I will keep poking, but additional hints always appreciated!

]]>
By: mmm http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-94 mmm Tue, 30 May 2006 23:52:53 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-94 <p>martin: Thanks for your help. I've given up on the problem with Xee for now.</p> <p>The menu trick kind of works; .I have to 'double-click' the menu button but that's still quicker than holding the menu button. One more thing to report, if I click on the left and right buttons quickly, I can 'escape' beyond the application icons in the RC menu.</p> martin: Thanks for your help. I’ve given up on the problem with Xee for now.

The menu trick kind of works; .I have to ‘double-click’ the menu button but that’s still quicker than holding the menu button. One more thing to report, if I click on the left and right buttons quickly, I can ‘escape’ beyond the application icons in the RC menu.

]]>
By: martin http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-93 martin Tue, 30 May 2006 20:45:31 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-93 <p>Hi Ian. Congratulations to your new MacBook!</p> <p>Well. It looks like you were doing everything right. The magic is, that Remote Control tries to be smart :)</p> <p>When you add or change a script, Remote Control tries to determine which application is scripted. It searches for "tell application 'xyz'" in the script. In this version the first one that is being found is used to determine the app name. With the app name Remote Control asks the OS if the application is installed. If the OS says no, Remote Control disables the "enable for remote control" switch.</p> <p>So the problem is that Remote Control gets the wrong app name or the OS does not find the Acrobat Reader program.</p> <p>I installed the acrobat reader and found a bug in Remote Control :) Adobe named the app "Adobe Reader 7.0.7" and it's the version number that is the problem here. By making a copy of the app and renaming the copy to "Adobe Reader" it worked. (Note: I had to start the "Adobe Reader" app in order to be recognized by RemoteControl).</p> <p>So that shall be a interim-solution till the next version.</p> <p>Thanks for the problem report!</p> Hi Ian. Congratulations to your new MacBook!

Well. It looks like you were doing everything right.
The magic is, that Remote Control tries to be smart :)

When you add or change a script, Remote Control tries to determine which application is scripted. It searches for “tell application ‘xyz’” in the script.
In this version the first one that is being found is used to determine the app name. With the app name Remote Control asks the OS if the application is installed. If the OS says no, Remote Control disables the “enable for remote control” switch.

So the problem is that Remote Control gets the wrong app name or the OS does not find the Acrobat Reader program.

I installed the acrobat reader and found a bug in Remote Control :) Adobe named the app “Adobe Reader 7.0.7″ and it’s the version number that is the problem here. By making a copy of the app and renaming the copy to “Adobe Reader” it worked. (Note: I had to start the “Adobe Reader” app in order to be recognized by RemoteControl).

So that shall be a interim-solution till the next version.

Thanks for the problem report!

]]>
By: martin http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-92 martin Tue, 30 May 2006 20:20:25 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-92 <p>@mmm: Thanks for the feedback. Great that it works now. The sample looks pretty normal. There must be some problem in conjunction with the script and the auto take control feature. For some reason remote control switches between two apps (perhaps there is some "Preview" code still in the script?). There will be fixes in this area in the next release.</p> <p>Regarding the up/down arrow problem with Xee. That's a problem of Xee. For whatever reason it does recognize the up/down arrow system events. I've tested that with Script Editor. The same up/down arrow code works for other apps (Safari, ...).</p> <p>Regarding the Menu Hold. You can already do what you want on a little bit different way. Just add the following line to the menu button script.</p> <p>set active application of remote manager to ""</p> <p>This will deactivate the current app. When you check the preference "show application menu after a remote controllable application exists" than the app chooser will show up automatically. With this preference enable, a single Menu Hold (just for a second) will bring up the app chooser.</p> @mmm: Thanks for the feedback. Great that it works now. The sample looks pretty normal. There must be some problem in conjunction with the script and the auto take control feature. For some reason remote control switches between two apps (perhaps there is some “Preview” code still in the script?). There will be fixes in this area in the next release.

Regarding the up/down arrow problem with Xee. That’s a problem of Xee. For whatever reason it does recognize the up/down arrow system events. I’ve tested that with Script Editor. The same up/down arrow code works for other apps (Safari, …).

Regarding the Menu Hold. You can already do what you want on a little bit different way.
Just add the following line to the menu button script.

set active application of remote manager to “”

This will deactivate the current app. When you check the preference “show application menu after a remote controllable application exists” than the app chooser will show up automatically. With this preference enable, a single Menu Hold (just for a second) will bring up the app chooser.

]]>
By: Ian http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-91 Ian Tue, 30 May 2006 17:46:20 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-91 <p>I added deng kun's script (changing the names to "Adobe Reader" since I'm running version 7.0.7), but the check button for "enable for remote control" never becomes clickable. Maybe I put the script in wrong..? I just created a new entry and then cut-and-pasted into the "complete script" view. Is there some additional magic?</p> <p>Confession: this Macbook is new and I am a longtime Unix and Linux user. I'm more used to a command line and vi than GUI stuff, so when I have to guess I usually guess wrong ;-)</p> I added deng kun’s script (changing the names to “Adobe Reader” since I’m running version 7.0.7), but the check button for “enable for remote control” never becomes clickable. Maybe I put the script in wrong..? I just created a new entry and then cut-and-pasted into the “complete script” view. Is there some additional magic?

Confession: this Macbook is new and I am a longtime Unix and Linux user. I’m more used to a command line and vi than GUI stuff, so when I have to guess I usually guess wrong ;-)

]]>
By: mmm http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-90 mmm Tue, 30 May 2006 00:02:46 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-90 <p>I take it back, it does work except for the arrow keys. I'm sending 125 and 126 to pan up and down the current image in Xee and for some reason, that doesn't seem to work. But the other keys all work now with the auto take control option disabled.</p> <p>On another note, I can't get RC's menu by simpling holding down menu. I have to hold it down, let go and then click menu to bring it up. Can you give us the option to have menu always bring up the RC menu in the next version? ie. disable custom mapping of menu button</p> I take it back, it does work except for the arrow keys. I’m sending 125 and 126 to pan up and down the current image in Xee and for some reason, that doesn’t seem to work. But the other keys all work now with the auto take control option disabled.

On another note, I can’t get RC’s menu by simpling holding down menu. I have to hold it down, let go and then click menu to bring it up. Can you give us the option to have menu always bring up the RC menu in the next version? ie. disable custom mapping of menu button

]]>
By: mmm http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-89 mmm Mon, 29 May 2006 23:49:59 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-89 <p>No deal, same problem with Xee.</p> <p>The sampling is much more sane though with that option turned off: 300 Thread<em>0f07 300 start 300 _start 300 NSApplicationMain 300 -[NSApplication run] 300 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] 300 _DPSNextEvent 300 BlockUntilNextEventMatchingListInMode 300 ReceiveNextEventCommon 300 RunCurrentEventLoopInMode 300 CFRunLoopRunInMode 300 CFRunLoopRunSpecific 300 mach</em>msg<em>trap 300 mach</em>msg<em>trap 300 Thread</em>1003 300 <em>pthread</em>body 300 forkThreadForFunction 300 +[NSURLConnection(NSURLConnectionInternal) <em>resourceLoadLoop:] 300 CFRunLoopRunInMode 300 CFRunLoopRunSpecific 300 mach</em>msg<em>trap 300 mach</em>msg<em>trap 300 Thread</em>1103 300 <em>pthread</em>body 300 forkThreadForFunction 300 +[NSURLCache <em>diskCacheSyncLoop:] 300 CFRunLoopRunInMode 300 CFRunLoopRunSpecific 300 mach</em>msg<em>trap 300 mach</em>msg_trap</p> No deal, same problem with Xee.

The sampling is much more sane though with that option turned off:
300 Thread0f07
300 start
300 _start
300 NSApplicationMain
300 -[NSApplication run]
300 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
300 _DPSNextEvent
300 BlockUntilNextEventMatchingListInMode
300 ReceiveNextEventCommon
300 RunCurrentEventLoopInMode
300 CFRunLoopRunInMode
300 CFRunLoopRunSpecific
300 mach
msgtrap
300 mach
msgtrap
300 Thread
1003
300 pthreadbody
300 forkThreadForFunction
300 +[NSURLConnection(NSURLConnectionInternal) resourceLoadLoop:]
300 CFRunLoopRunInMode
300 CFRunLoopRunSpecific
300 mach
msgtrap
300 mach
msgtrap
300 Thread
1103
300 pthreadbody
300 forkThreadForFunction
300 +[NSURLCache diskCacheSyncLoop:]
300 CFRunLoopRunInMode
300 CFRunLoopRunSpecific
300 mach
msgtrap
300 mach
msg_trap

]]>
By: martin http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-88 martin Mon, 29 May 2006 07:33:05 +0000 http://www.martinkahr.com/2006/05/22/more-control-with-version-12/#comment-88 <p>Thanks a lot for the sample file. Something crazy is going there. Seems like the "auto take control" feature is activating different applications all the time. You can turn off that feature in the general preferences until the next version.</p> <p>Unfortunatly I was unable to reproduce bug until now. I played a little with the Xee application and everything was fine with the following script. Perhaps you'll give that a try, too. This one makes sure that the Xee application is the front most application when a button is pressed, too.</p> <p>-- Xee Script global pageDownCode global pageUpCode global plusCode global minusCode set pageDownCode to 121 set pageUpCode to 116 set plusCode to 69 set minusCode to 78</p> <p>on rcPlus() tell application "Xee" activate end tell tell application "System Events" set procPreview to first process where name is "Xee" if not procPreview is null then tell procPreview to key code pageUpCode end tell end rcPlus</p> <p>on rcMinus() tell application "Xee" activate end tell tell application "System Events" set procPreview to first process where name is "Xee" if not procPreview is null then tell procPreview to key code pageDownCode end tell end rcMinus</p> <p>on rcPlay() tell application "Xee" activate end tell tell application "System Events" set procPreview to first process where name is "Xee" if not procPreview is null then tell procPreview to key code plusCode using {command down} (* for the next line UI Scripting must be enabled in order to work *) tell procPreview to click menu item "Zoom" of menu 1 of menu bar item "Window" of menu bar 1 end end tell end rcPlay</p> <p>on rcMenu() tell application "Xee" activate end tell tell application "System Events" set procPreview to first process where name is "Xee" if not procPreview is null then tell procPreview to key code minusCode using {command down} end tell end rcMenu</p> <p>on rcActivate() -- -- code that will be executed if the application is activated -- tell application "Xee" activate end tell<br /> end rcActivate</p> Thanks a lot for the sample file. Something crazy is going there. Seems like the “auto take control” feature is activating different applications all the time. You can turn off that feature in the general preferences until the next version.

Unfortunatly I was unable to reproduce bug until now. I played a little with the Xee application and everything was fine with the following script. Perhaps you’ll give that a try, too. This one makes sure that the Xee application is the front most application when a button is pressed, too.

– Xee Script
global pageDownCode
global pageUpCode
global plusCode
global minusCode
set pageDownCode to 121
set pageUpCode to 116
set plusCode to 69
set minusCode to 78

on rcPlus()
tell application “Xee”
activate
end tell
tell application “System Events”
set procPreview to first process where name is “Xee”
if not procPreview is null then tell procPreview to key code pageUpCode
end tell
end rcPlus

on rcMinus()
tell application “Xee”
activate
end tell
tell application “System Events”
set procPreview to first process where name is “Xee”
if not procPreview is null then tell procPreview to key code pageDownCode
end tell
end rcMinus

on rcPlay()
tell application “Xee”
activate
end tell
tell application “System Events”
set procPreview to first process where name is “Xee”
if not procPreview is null then
tell procPreview to key code plusCode using {command down}
(* for the next line UI Scripting must be enabled in order to work *)
tell procPreview to click menu item “Zoom” of menu 1 of menu bar item “Window” of menu bar 1
end
end tell
end rcPlay

on rcMenu()
tell application “Xee”
activate
end tell
tell application “System Events”
set procPreview to first process where name is “Xee”
if not procPreview is null then tell procPreview to key code minusCode using {command down}
end tell
end rcMenu

on rcActivate()

— code that will be executed if the application is activated

tell application “Xee”
activate
end tell
end rcActivate

]]>