Drought Posted September 16, 2006 Posted September 16, 2006 i want to write a script to switch tracks in my media player. i wrote a script but theres a problem if i want to start: it opens then itcloses after 3 secs... the script is : HotKeySet("^{HOME}", "TogglePause") HotKeySet("^{END}", "ToggleStop") HotKeySet("^{PGDN}", "ToggleNext") HotKeySet("^{PGUP}", "TogglePrev") Func TogglePause Send ( "{MEDIA_PLAY_PAUSE}" ) EndFunc Func ToggleStop Send ( "{MEDIA_STOP}" ) EndFunc Func ToggleNext Send ( "{MEDIA_NEXT}" ) EndFunc Func TogglePrev Send ( "{MEDIA_PREV}" ) EndFunc maybe all is wrong...im a noob^^
cppman Posted September 16, 2006 Posted September 16, 2006 HotKeySet("^{HOME}", "TogglePause") HotKeySet("^{END}", "ToggleStop") HotKeySet("^{PGDN}", "ToggleNext") HotKeySet("^{PGUP}", "TogglePrev") while 1 wend Func TogglePause Send ( "{MEDIA_PLAY_PAUSE}" ) EndFunc Func ToggleStop Send ( "{MEDIA_STOP}" ) EndFunc Func ToggleNext Send ( "{MEDIA_NEXT}" ) EndFunc Func TogglePrev Send ( "{MEDIA_PREV}" ) EndFunc Miva OS Project
FuryCell Posted September 17, 2006 Posted September 17, 2006 (edited) It would be wise to add a sleep so it does not eat the entire cpu. HotKeySet("^{HOME}", "TogglePause") HotKeySet("^{END}", "ToggleStop") HotKeySet("^{PGDN}", "ToggleNext") HotKeySet("^{PGUP}", "TogglePrev") while 1 Sleep(100) wend Func TogglePause Send ( "{MEDIA_PLAY_PAUSE}" ) EndFunc Func ToggleStop Send ( "{MEDIA_STOP}" ) EndFunc Func ToggleNext Send ( "{MEDIA_NEXT}" ) EndFunc Func TogglePrev Send ( "{MEDIA_PREV}" ) EndFunc Also , please remember to post v3 questions in the v3 support forum. Edited September 17, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
block16 Posted September 17, 2006 Posted September 17, 2006 how can I set an avatar on this message board?
FuryCell Posted September 18, 2006 Posted September 18, 2006 (edited) how can I set an avatar on this message board? This page:http://www.autoitscript.com/forum/index.ph...rCP&CODE=24Also, It is wise to start your own thread instead of hijacking somebody else's, especially when it has nothing to do with the topic at hand. Edited September 18, 2006 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
Recommended Posts