Rendezvous: Difference between revisions

m
→‎{{header|AutoHotkey}}: Minor indentation and casing edit
m (→‎{{header|AutoHotkey}}: Minor indentation and casing edit)
Line 157:
print("And mounting its back,")
print("Flew up to the moon.")
Return
return
 
print2:
Line 165:
print("All the king's horses and all the king's men")
print("Couldn't put Humpty together again.")
Return
return
print(message)
{
staticStatic StringToSend
StringToSend := message
Gui +LastFound
Line 177:
SendMessage, 0x4a, 0, &CopyDataStruct
If ErrorLevel
msgbox MsgBox out of ink
sleepSleep, 200
returnReturn
}
 
PrintMonitor(wParam, lParam, msg)
{
static Static ink = 5
global Global printed
Critical
if If ink
{
StringAddress := NumGet(lParam + 8)
StringLength := DllCall("lstrlen", UInt, StringAddress)
VarSetCapacity(CopyOfData, StringLength)
DllCall("lstrcpy", "str", CopyOfData, "uint", StringAddress)
printed .= "primaryprinter: " . CopyOfData . "`n"
ToolTip, primary printer`n: %printed%
ink--
}
Else
else
{
OnMessage(0x4a, "Reserve")
print(CopyOfData)
}
}
 
Reserve(wParam, lParam, msg)
{
static Static ink = 5
global Global printed
Critical
if If ink
{
StringAddress := NumGet(lParam + 8)
StringLength := DllCall("lstrlen", UInt, StringAddress)
VarSetCapacity(CopyOfData, StringLength)
DllCall("lstrcpy", "str", CopyOfData, "uint", StringAddress)
printed .= "reserveprinter: " . CopyOfData . "`n"
ToolTip, Reserve printer`n: %printed%
ink--
}
Else
else
return Return -1
}
</lang>