![Wink ;)](./images/smilies/icon_e_wink.gif)
https://www.autohotkey.com/board/topic/1521-wake-on-lan-cmd/
https://www.depicus.com/wake-on-lan/wake-on-lan-cmd
Möglicherweise geht es auch direkt mit AHK's Socket.ahk...
Code: Select all
; 'https://stackoverflow.com/questions/29459690/wake-on-lan-wol-start-computers-over-the-network' by Forivin
#include Socket.ahk ;http://pastebin.com/CtM9p4QG
WakeOnLAN("AABBCCDDEEFF") ;Example - use the mac address of your target here
ExitApp
WakeOnLAN(mac) {
magicPacket_HexString := GenerateMagicPacketHex(mac)
size := CreateBinary(magicPacket_HexString, magicPacket)
UdpOut := new SocketUDP()
UdpOut.connect("addr_broadcast", 9)
UdpOut.enableBroadcast()
UdpOut.send(&magicPacket, size)
}
GenerateMagicPacketHex(mac) {
magicPacket_HexString := "FFFFFFFFFFFF"
Loop, 16
magicPacket_HexString .= mac
Return magicPacket_HexString
}
CreateBinary(hexString, ByRef var) { ;Credits to RHCP!
sizeBytes := StrLen(hexString)//2
VarSetCapacity(var, sizeBytes)
Loop, % sizeBytes
NumPut("0x" SubStr(hexString, A_Index * 2 - 1, 2), var, A_Index - 1, "UChar")
Return sizeBytes
}