
shay
Active Members-
Posts
69 -
Joined
-
Last visited
shay's Achievements

Wayfarer (2/7)
0
Reputation
-
[quote name='Ascend4nt' date='14 June 2010 - 11:08 AM.... ...Also, would you mind telling people what the program is? Searches for LU-1000 didn't bring up anything useful for me.
-
yes its a typo, in my code it`s doesn't look like that. i know the loop want exit, also i try WinWaitActive with no luke. it doesn't work on the 64Bit PC.
-
the title is the same.
-
Hi i write a script that on 32bit PC when i test in all run OK but when i run the code on 64bit PC it didn't work so good, it get stuck on the "WinWaitActive" so i try to baypass this with a loop with no lock ;close installation GUI Do WinActivate ("LU-1000") $handle = WinGetHandle("LU-1000","") sleep(1500) $wait = WinWait("LU-1000", "exit") Until $wait = $handle any idea?
-
the problem isn't the controlclik addressing, (I try that) the script work flawlessly on XP32bit PC and on my other PC (64bit) its stuck, unable to confirm that window exist, is there any problem with running script on 64BIT machine?
-
Hi i use AutoIt to uninstall and reinstall software, i create this script on my test PC and it work OK (XP 32bit SPII), but when testing it on the actual PC (XP 64Bit SPII) it didn't work, the script stuck on "close installation GUI". i also try to replace it with "WinWaitActive" to detect the last installation window but it didn`t work on the actual pc also. (this is a apart of the big script) $exe = "c:\automation_files\setup.exe" $run=Run($exe) if $run = 0 Then MsgBox (16, "Automation", "Unable to locate Installation File, Exit Installation") Exit Endif ;focus in window WinActivate ("LU-1000") ;press key in GUI WinWaitActive("LU-1000") Sleep(1000) ControlClick('','', "&Next >") Sleep(1000) WinWaitActive("","Select Installation Folder") send("{TAB}") sleep(500) send("C:\Program Files (x86)\LiveU") sleep(500) ControlClick('','', "&Next >") ControlClick('','', "&Next >") winWaitActive("","Confirm Installation") controlClick('','', "&Next >") sleep(30000) ;close installation GUI Do WinActivate ("LU-1000") $handle = WinGetHandle("LU-1000","") sleep(1500) $wait = WinWait("LU-1000", "exit") Until $wait = $handle WinActivate ("LU-1000") sleep(2000) ControlClick('','', "&Close") send("{ENTER}") sleep(2000)
-
today i use Control functions but when testing Flash based GUI or so, the only control i can use is X,Y based, i assume that if i use Pixel function it will be more reliable.
-
HI all i would like start using and learn more about Pixel function, looking in the AUtoItHelp files didn't help me learn about the limitation of it. can i use these functions to recognize button location in GUI or so..? is there any good tutorial that i can refer to? Shay
-
The GUI was no problem but i don't have any idea how to execute the "Refresh" so the IP will refresh. #include <INet.au3> GuiCreate("IP",230,200,209,29) $Public = _GetIP() if $Public = 0 Then $Public = "Error local IP" EndIf $lan1 = @IPAddress1 $lan2 = @IPAddress2 $name = @ComputerName $button1=GuiCtrlCreateButton("Exit",24,160,87,34) $button2=GuiCtrlCreateButton("Refresh",121,160,87,34) $label1=GuiCtrlCreateLabel("Public IP: " &$Public,50,40,136,15) $label2=GuiCtrlCreateLabel("Local IP: " & $lan1,50,60,136,15) $label3=GuiCtrlCreateLabel("Local LAN 2: " & $lan2,50,80,136,15) $label4=GuiCtrlCreateLabel("PC Name: " & $name,50,110,136,15) GuiSetState() While 1 $msg=GuiGetMsg() If $msg=-3 Then Exit If $msg=$button1 Then button1() If $msg=$button2 Then button2() Wend Func button1() Exit EndFunc Func button2() ;need to refresh the labels EndFunc
-
i use this small script to see my IP etc... i want to move this code to GUI and so i can do "refresh" to the IP etc... i need Exit and refresh button. #include <INet.au3> $Public = _GetIP() if $Public = 0 Then $Public = "Error local IP" EndIf $lan1 = @IPAddress1 $lan2 = @IPAddress2 $name = @ComputerName MsgBox(0, "IpConfig", "Public IP: " &$Public & @CRLF & @CRLF & "Local IP: " & $lan1 & @CRLF & @CRLF & "Local LAN 2: " & $lan2 & @CRLF & @CRLF & "PC Name: " & $name ) thanks
-
Hi all i use this code for error handling many times in my script if $fileEx = 0 Then MsgBox (0,"script", "Error: unable to find D:\dir\file.exe") Exit EndIf if $fileEx2 = 0 Then MsgBox (0,"script", "Error: unable to find D:\dir\file.exe") Exit EndIf is there any way to to improve this code ? possibly somthing like this?? f $fileEx or $fileEx2 = 0 then ....
-
indeed problem in my INI file, all working fine once again thanks
-
Hi Stefan i try using your script with partially success, i increase the loop to 10 cycles. i have problem in cycles above 7, some time the "IniWrite" return with the default parameters, i try to add "sleep" after "IniWrite" but still problem exist. any idea?
-
thenks you all always good to learn how to improve my code!!
-
HI i need to write from one INI to other files one way to do this is line by line, can i do that in loop or so so the code will be "nicer"?? see my example, ( i need to do that x10 ) $path = "c:\unit.ini" $instance = "" $pathTo = "C:\Program Files (x86)\LiveU1\config\" ;>>>>>> instance 1 <<<<<< $port1 = IniRead($path, "instance1", "port1","default") $port2 = IniRead($path, "instance1", "port2","default") $name = IniRead($path, "instance1", "name","default") IniWrite("C:\Program Files (x86)\LiveU1\config\server.ini","DMUX1","data_port", " " & $port1) IniWrite("C:\Program Files (x86)\LiveU1\config\server.ini","DMUX1","control_port", " " & $port2) IniWrite("C:\Program Files (x86)\LiveU1\config\server.ini","PLAYER", "unit_name", " " & $name) ;>>>>>> instance 2 <<<<<< $port1 = IniRead($path, "instance2", "port1","default") $port2 = IniRead($path, "instance2", "port2","default") $name = IniRead($path, "instance2", "name","default") IniWrite("C:\Program Files (x86)\LiveU2\config\server.ini","DMUX1","data_port", " " & $port1) IniWrite("C:\Program Files (x86)\LiveU2\config\server.ini","DMUX1","control_port", " " & $port2) IniWrite("C:\Program Files (x86)\LiveU2\config\server.ini","PLAYER", "unit_name", " " & $name) ;>>>>>> instance 3 <<<<<< $port1 = IniRead($path, "instance3", "port1","default") $port2 = IniRead($path, "instance3", "port2","default") $name = IniRead($path, "instance3", "name","default") IniWrite("C:\Program Files (x86)\LiveU3\config\server.ini","DMUX1","data_port", " " & $port1) IniWrite("C:\Program Files (x86)\LiveU3\config\server.ini","DMUX1","control_port", " " & $port2) IniWrite("C:\Program Files (x86)\LiveU3\config\server.ini","PLAYER", "unit_name", " " & $name)