i try to broadcast a packet over UDP, containing the mac address of a pc, and formatted to turn a pc on.
more info about wol:
http://nl.wikipedia.org/wiki/Wake-on-LAN
btw: You need the Python lib to be properly installed;
To my surprise, the script works

Unexpected EOF while parsing (line:0, offset:0)
Code: Select all
// COMPILE_OPTS|C:\projecten\DjekData\Watson\startuppc05.exe||CONSOLE=0|INCLUDES=1||RUNTIMES=1|BMPS=1
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
//test-magicpacket sent to pc to wake up
//stuur naar subnet 192.168.170.255 port 9
//macaddress of the pc
let>mac=54-be-f7-02-e1-d7
//convert hex to bytes
MidStr>mac,1,2,mac1
VBEval>CLng("&h" & "%mac1%"),mac1
MidStr>mac,4,2,mac2
VBEval>CLng("&h" & "%mac2%"),mac2
MidStr>mac,7,2,mac3
VBEval>CLng("&h" & "%mac3%"),mac3
MidStr>mac,10,2,mac4
VBEval>CLng("&h" & "%mac4%"),mac4
MidStr>mac,13,2,mac5
VBEval>CLng("&h" & "%mac5%"),mac5
MidStr>mac,16,2,mac6
VBEval>CLng("&h" & "%mac6%"),mac6
VBEval>chr(%mac1%),l1
VBEval>chr(%mac2%),l2
VBEval>chr(%mac3%),l3
VBEval>chr(%mac4%),l4
VBEval>chr(%mac5%),l5
VBEval>chr(%mac6%),l6
VBEval>chr(255),f
//build magic packet
let>s1=%l1%%l2%%l3%%l4%%l5%%l6%
let>s2=%f%%f%%f%%f%%f%%f%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%%s1%
/*
python_code:
import socket
UDP_IP = "192.168.170.255"
UDP_PORT = 9
MESSAGE = "%s2%"
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # UDP
sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
*/
LabelToVar>python_code,pcode
PYExec>pcode,u,sock
label>einde
/*Het "magic packet" bestaat uit 102 bytes.
Het start met 6 bytes van het hexadecimale getal 255 (FF FF FF FF FF FF)
gevolgd door zestien keer het 48-bit MAC addres van de computer die opgestart dient te worden.
*/

/////////////////////////////BREAKING NEWS !!///////////////////////////////
Solved,
i forgot to put in sock in the syntax:
PYExec>pcode,u,sock
i ve fixed it in the script above
/////////////////////////////BREAKING NEWS !!///////////////////////////////
Thanks in advance,
kind regards,
Djek