The first few presses work, then the script quits working?
Code: Select all
Volume_Up::
oHttp := ComObjCreate("Msxml2.XMLHTTP")
oHttp.open("GET","http://UserName:[email protected]/sys/devices/customdevices/OSC?d??VolumeUp")
oHttp.send()
Code: Select all
Volume_Up::
oHttp := ComObjCreate("Msxml2.XMLHTTP")
oHttp.open("GET","http://UserName:[email protected]/sys/devices/customdevices/OSC?d??VolumeUp")
oHttp.send()
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Volume_Up::
oHttp := ComObjCreate("Msxml2.XMLHTTP")
oHttp.open("GET","http://username:[email protected]/sys/devices/customdevices/OSC?d??VolumeUp")
oHttp.send()
sleep, 60
return
Code: Select all
Volume_Up::HttpSend("VolumeUp")
Volume_Down::HttpSend("VolumeDown")
Volume_Mute::HttpSend("VolumeMute")
HttpSend(Action) {
oHttp := ComObjCreate("Msxml2.XMLHTTP")
oHttp.open("GET","http://username:[email protected]/sys/devices/customdevices/OSC?d??" Action)
oHttp.send()
sleep, 60
}
tmplinshi wrote:try:Code: Select all
Volume_Up::HttpSend("VolumeUp") Volume_Down::HttpSend("VolumeDown") Volume_Mute::HttpSend("VolumeMute") HttpSend(Action) { oHttp := ComObjCreate("Msxml2.XMLHTTP") oHttp.open("GET","http://user:[email protected]/sys/devices/customdevices/OSC?d??" Action) oHttp.send() sleep, 60 }
Users browsing this forum: No registered users and 272 guests