Hi. I'm a newbie to PowerPro and to PowerPro scripting. I have been going
through the scripting tutorial and I wrote a little script that I like. It
toggles an app (that opens a window) on/off from the same hotkey or button
with 1 script command :) I like the idea of doing this with apps that
don't need to do anything before exiting, like, say, a media player that
has an awkward pop-up menu selection for Exit.
Not to be redundant, but I have rewritten my code in "pseudo-code" for
easier reading.
Steve
-------------------------
; script to toggle a program from the same hotkey/button
; Author: Steven Groginsky
; Date: May 19, 2004
; License: Released to the Public Domain
; This is "pseudo-code" - you must substitute your own values in order to
run it.
;*** Note: to run this script assign *keys runfile script_pathname to a
hotkey or button.
; if program has window open
if (anywindow "*window name*") Do
; close the program
keys {to "*window name*"}closestring
else
; if no program window open, run program
"program pathname"
endif
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/