Jump to content

Zane

Members
  • Posts

    8
  • Joined

  • Last visited

Zane's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. That's weird, maybe because I have a 3G internet connection
  2. My mistake, the website is "ipaddress.net16.net" but I get the IP from "ipaddress.net16.net/ip.php", so I think the function should be: Func GetIP() Local $bRead, $sRead, $sReturn $bRead = InetRead("http://ipaddress.net16.net/ip.php",1) $sRead = BinaryToString($bRead) $sReturn = StringRegExp($sRead, '(?s)(?i)<body>(.*?)</body>', 3) If Not @error Then Return $sReturn[0] Return SetError(1, 1, -1) EndFunc ;==>GetIP
  3. I do not know why, but I think this function to get the external IP address is a bit faster than _GetIP included in "inet.au3"at least on my computer is a bit faster. The website where I get the IP is ipaddress.net16.net. I hope it's useful. Func GetIP() $IP=InetRead("http://ipaddress.net16.net/ip.php",1) $IP=BinaryToString($IP) $IP=StringTrimLeft($IP,12) $end=StringInStr($IP,"</body></html>")-1 $IP=StringLeft($IP,$end) Return $IP EndFunc MsgBox(4096, "", GetIP() )
  4. nice script
  5. tank you , just was i needed #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 172, 53, 313, 377) $Start = GUICtrlCreateButton("Start", 8, 16, 75, 25, $WS_GROUP) $Stop = GUICtrlCreateButton("Stop", 88, 16, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start AdlibRegister ("Test1") Case $Stop AdlibUnRegister ("Test1") Exit EndSwitch WEnd Func Test1() RegWrite ("HKEY_CURRENT_USER\Software\MyApplication", "testkey", "REG_SZ", "im a value") EndFunc
  6. is there a way to do a loop in second plane without affecting the buttons? for example: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 172, 53, 313, 377) $Start = GUICtrlCreateButton("Start", 8, 16, 75, 25, $WS_GROUP) $Stop = GUICtrlCreateButton("Stop", 88, 16, 75, 25, $WS_GROUP) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start $A = "0" Do RegWrite ("HKEY_CURRENT_USER\Software\MyApplication", "testkey", "REG_SZ", "im a value") Until $A = "1" Case $Stop Exit EndSwitch WEnd why i cant use the stop button , please giveme a solution
  7. thank you very much, but im testing with other commands and i get the same message for example: Select Case $CmdLine[0] = "" Run ("c:\windows\notepad.exe") Case $CmdLine[1] = "/a" RegDelete ("HKEY_LOCAL_MACHINE\SOFTWARE\MyApplication1", "Startup") Case $CmdLine[2] = "/b" MsgBox (0, "", "msgbx example") Case $CmdLine[3] = "/c" InetGet("http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-setup.exe", "C:\autoit.exe") EndSelect
  8. I'm testing the autoit Command Line Parameters, when I use my executable without parameters is normally executed but when I use different parameters I get this message, please help me Code: Select Case $CmdLine[0] = "" MsgBox (0, "", "no parameter was used") ;do something Case $CmdLine[1] = "/p1" MsgBox (0, "", "parameter 1 was used") ;do something Case $CmdLine[2] = "/p2" MsgBox (0, "", "parameter 2 was used") ;do something Case $CmdLine[3] = "/p3" MsgBox (0, "", "parameter 3 was used") ;do something EndSelect
×
×
  • Create New...