PDA

View Full Version : SKSchema #tap -- need assistance


prestonmcafee
01-05-2006, 05:03 AM
I'm trying to launch a program, then activate the OK in the upper right hand corner, which minimizes the program. There is a utility to help figure out the coordinates of tap, which indicates the lower left corner has X= 50 and Y = 106, and the upper right has X=214 and Y=50.

I created a "filled" text file and had SKSchema open it and jump around the corners tapping, and then just watched the cursor. It doesn't get nearly to the corners, reaching only about 25% down the screen and 75% across. It does the same thing, approximately, whether it is in landscape or portrait mode.

Does anyone have any idea what #tap actually does? Does it use the pixels as points?

prestonmcafee
01-05-2006, 05:58 AM
I see -- the box isn't identifying corners of the screen but coordinates of corners of the box.

Approximately the screen is a Cartesian plane, with (0,0) in the upper left and (240,360) in the lower right, but a few pixels are lost or inaccessible.

prestonmcafee
01-05-2006, 08:32 AM
I post these not because they are good -- they are the first two programs of a complete novice, and there is surely better code -- but because I can't find many examples of working SKSchema programs, and that is the best way to learn a programming language in my limited experience.

This program waits ten seconds, launches phm_traylnch_182.exe, which happened to be stored in the \My Documents\Programs\ folder, waits another ten seconds, then hits OK, which is in the upper right hand corner.

#r(\My Documents\Programs\phm_traylnch_182.exe) #sleep(10000)
#r(#tap) #p(228;12) #sleep(10000)

This program first, launches email, waits 5 seconds to be sure it comes up (this isn't adequate time if the app isn't minimized, but I have it automatically start when the device is rebooted) then empties the deleted items folder (Menu, up, up, select, down, select,left, select), then, checks messages (Menu, up, up, up, up, select). Menu is achieved by the tap command, at coordinates (197,309).

#r(\Windows\Start Menu\Programs\Messaging.lnk)
#r(#tap) #p(197;309) #sleep(5000)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#R) #sleep(100)
#r(#sendkey) #p(#!) #sleep(100)
#r(#sendkey) #p(#R) #sleep(100)
#r(#sendkey) #p(#<) #sleep(100)
#r(#sendkey) #p(#R) #sleep(100)
#r(#tap) #p(197;309) #sleep(1000)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#^) #sleep(100)
#r(#sendkey) #p(#R) #sleep(100)

SKSchema is a remarkably powerful program.

prestonmcafee
14-09-2006, 12:54 AM
This is a working Skschema program to run every night and update my weather and RSS feeds. Since there isn't so much documentation on how to make these programs run (e.g. NOTHING tells you that #rmt works with #msg!), I like to post them for others, because I wish more were posted online. (To be fair, the link for programs on the skschema page seemed dead in firefox, but in fact works with some editing of the hyperlink).

Note that comments in the program start with a semi-colon. To make it run nightly, one sets it to run in skschema or creates a notification with memmaid. The messages (#msg) are useful for debugging but otherwise serve no role.

#r(#gsmoff) #sleep(1000)
;turn the phone off
#r(#wlanon) #sleep(2000)
;turn wifi on

#r(#chkwlan) #sleep(20000)
#r(#iftrue) #p(2)
#r(#GOTO) #p(end)
;if wifi didn't come on in 20 seconds, give up

#r(#label) #p(2)
;if we got here, wifi is on
#r(#msg) #p(Wifi On!) #rmt(1000)

;start handyweather and set it to update
#r(\Storage Card\Program Files\HandyWeather\HandyWeather.exe) #sleep(1000)
#r(#msg) #p(Starting HandyWeather) #rmt(1000)
#r(#tap) #p(197;309) #sleep(10000)
#r(#sendkey) #p(U) #sleep(1000)
;this taps the right softkey and then sends letter U, for update

;start newsbreak and set it to update
#r(\Storage Card\Program Files\NewsBreak\NewsBreak.exe) #sleep(30000)
#r(#msg) #p(Starting Newsbreak) #rmt(1000)
#r(#tap) #p(197;309) #sleep(10000)
#r(#sendkey) #p(R) #sleep(1000)
;this taps right softkey then sends letter R for refresh.

;wait 180 seconds and then kill both programs
#r(#kill) #p(HandyWeather.exe) #sleep(180000)
#r(#msg) #p(killing HandyWeather) #rmt(1000)
#r(#kill) #p(NewsBreak.exe) #sleep(4000)
#r(#msg) #p(killing Newsbreak) #rmt(1000)

;turn off the wifi
#r(#wlanoff)
#r(#msg) #p(Turning Wifi Off) #rmt(1000)

#r(#label) #p(end)
#r(#msg) #p(Program Over) #rmt(5000)
#r(#gototoday)