nitekram Posted March 16, 2006 Posted March 16, 2006 I am trying automate the task of always having to chose the IP/Server on VNC. The issue is I can run the session by double clicking the icon whick is *.vnc. My command would be like this. Run("start C:\Program Files\RealVNC\VNC4\vncviewer.exe /test.VNC") Run("start C:\Program Files\RealVNC\VNC4\vncviewer.exe test.VNC") Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe /test.VNC") Run("C:\Program Files\RealVNC\VNC4\test.VNC") I have tried . I get an error stating - unable to resolve host by name: No such host is known. (11001) Has anyone come across this? I am sorry if this has been stated before - I looked on the formums and could not find anything, but I am willing to be wrong. Thanks from a newbee. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
flaxcrack Posted March 16, 2006 Posted March 16, 2006 Don't use RUN(), but use RUNWAIT().I am trying automate the task of always having to chose the IP/Server on VNC. The issue is I can run the session by double clicking the icon whick is *.vnc.My command would be like this.Run("start C:\Program Files\RealVNC\VNC4\vncviewer.exe /test.VNC")Run("start C:\Program Files\RealVNC\VNC4\vncviewer.exe test.VNC")Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe /test.VNC")Run("C:\Program Files\RealVNC\VNC4\test.VNC")I have tried . I get an error stating - unable to resolve host by name: No such host is known. (11001)Has anyone come across this? I am sorry if this has been stated before - I looked on the formums and could not find anything, but I am willing to be wrong.Thanks from a newbee. [quote] Gilbertson's Law: Nothing is foolproof to a sufficiently talented fool.Sandro Alvares: Flaxcrack is please not noob! i can report you is stop stupid. The Post[/quote]I made this: FWD & MD5PWD()
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Don't use RUN(), but use RUNWAIT().I have triedRunwait("C:\Program Files\RealVNC\VNC4\vncviewer.exe test.VNC")Same issue - 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Developers Jos Posted March 16, 2006 Developers Posted March 16, 2006 I have triedRunwait("C:\Program Files\RealVNC\VNC4\vncviewer.exe test.VNC")Same issue -what would you type in the CMD window to make it work ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
nitekram Posted March 16, 2006 Author Posted March 16, 2006 what would you type in the CMD window to make it work ?From Start|Run"C:\Program Files\RealVNC\VNC4\vncviewer.exe" test.VNCGives the same error - the only way that I know to RUN it is to double click the icon - that works fine - takes a little while to come up but it does come up.Maybe it is not possible - just thought I would check. By the way the test.VNC is in INI file format. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 (edited) Here's your solution When you have VNC installed you can simple double click on it to get it started. So you can use following code and it will be all great Run(@ComSpec & " /c c:\dupa.vnc", '', @SW_HIDE, 2) or Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe -config c:\dupa.vnc") Edited March 16, 2006 by MadBoy My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 (edited) Here's your solution When you have VNC installed you can simple double click on it to get it started. So you can use following code and it will be all great Run(@ComSpec & " /c c:\dupa.vnc", '', @SW_HIDE, 2) or Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe -config c:\dupa.vnc") With the above code using -config - I get an error - Failed to read configuration file. With the other code Run(@ComSpec & " /c c:\dupa.vnc", '', @SW_HIDE, 2) - I think I get a small black box that pops up for a brief second but then goes away - I tried to use @SW_SHOW - but did not work. EDIT ************** I tried again with the @SW_SHOW and now I get a black box (DOS like) and once I click on the box it comes up. I will work on it and get back with my findings. Edited March 16, 2006 by nitekram 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 With the above code using -config - I get an error - Failed to read configuration file.With the other code Run(@ComSpec & " /c c:\dupa.vnc", '', @SW_HIDE, 2) - I think I get a small black box that pops up for a brief second but then goes away - I tried to use @SW_SHOW - but did not work.Well change c:\dupa.vnc to wherever you have your .vnc file ;p My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Well change c:\dupa.vnc to wherever you have your .vnc file ;pIt seems to work now with it on the root of C:\ - but when I use it from the path it seems to just go away like I stated before with a small black window showing for a brief second.Run(@ComSpec & " /c C:\Program Files\RealVNC\VNC4\test.VNC", '', @SW_SHOW, 2)Am I missing some QUOTES ? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 (edited) Run(@ComSpec & " /c C:\""Program Files""\RealVNC\VNC4\dupa.vnc", '', @SW_HIDE, 2) or Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe -config ""C:\Program Files\RealVNC\VNC4\dupa.vnc""") as the command line start is vncviewer.exe -config "path.to.vnc.file" Edited March 16, 2006 by MadBoy My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Run(@ComSpec & " /c C:\""Program Files""\RealVNC\VNC4\dupa.vnc", '', @SW_HIDE, 2) or Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe -config ""C:\Program Files\RealVNC\VNC4\dupa.vnc""") as the command line start is vncviewer.exe -config "path.to.vnc.file" How do you post code - about 600+ lines - I have seen it like code block - how do you use the tag. expandcollapse popup#include <GuiConstants.au3> Global $DumpOut = 0 HotKeySet('{esc}', "MyExitLoop") #cs $InetActive = Ping("www.google.com") If Not $InetActive > 0 Then MsgBox(4112, "Connection Not Found!", "You must be connected to the Internet" & @CRLF & "to use this program") Exit EndIf #ce MsgBox(0, "Help File", "Pick a script and when done go to doc and right click and paste," & @CRLF & "or CTRL V for paste" & @CRLF & "If More are needed let me know") ; GUI GUICreate("Scriptor", 175, 90, (@DesktopWidth - 191) / 2, (@DesktopHeight - 157) / 2) opt("TrayMenuMode", 1) opt("TrayOnEventMode", 1) $show_tray = TrayCreateItem("About this Program") TrayItemSetOnEvent(-1, "Set_Show") TrayCreateItem("") $exit_tray = TrayCreateItem("Exit this Program") TrayItemSetOnEvent(-1, "Set_Exit") TraySetState() $Combo_1 = GUICtrlCreateCombo("Select Script", 10, 10, 150, 21) GUICtrlSetData($Combo_1, "|vender|calculator") $Button1 = GUICtrlCreateButton('GO', 35, 35, 100, 17) GUICtrlCreateLabel("Minutes to play?", 10, 55, 250, 20) $input = GUICtrlCreateInput(60, 125, 53, 30, 17, $ES_NUMBER) GUISetState() While 1 $MainMsg = GUIGetMsg() Select Case $MainMsg = $GUI_EVENT_CLOSE Exit Case $MainMsg = $Button1 If GUICtrlRead($Combo_1) = 'Vender' then MyCopy() ; then Run('notepad.exe') If GUICtrlRead($Combo_1) = 'calculator' Then Run('calc.exe') EndSelect WEnd ;------------- Functions ---------------------- Func MyExitLoop() $DumpOut = 1 EndFunc;==>MyExitLoop Func Set_Exit() Exit EndFunc;==>Set_Exit Func Set_Show() MsgBox(64, " About this Program"," ") EndFunc;==>Set_Show ; GUI MESSAGE LOOP GUISetState() While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd Func MyCopy() Run(@ComSpec & " /c c:\APCI.VNC", '', @SW_SHOW, 2) ;Run(@ComSpec & " /c C:\Program Files\RealVNC\VNC4\APCI.VNC", '', @SW_SHOW, 2) #cs $my_file = "C:\test.txt" $file = FileOpen($my_file, 0) ; Check if file opened for reading OK If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf Clipput(FileRead($my_file)) FileClose($my_file) #ce EndFunc This works but my other code does not - I want to post it and see what you guys think might be the issue. But I want to post it in a code block - can someone help 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 Try: codebox My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Try: codebox Ok Here it is - be nice I am still new - the part that is giving me all the issues is the first combobox - starting with line 500 in SciTE CODE ; ---------------------------------------------------------------------------- ; ; AutoIt Version: 3.1.0 BETA ; Author: nitekram <nitekram@************.***> ; ; Script Function: ; GUI to be used to run programs, scripts, tools. ; Create a new GUI for EACH set of TOOLS ; ; TOOLS COULD INCLUDE ; ; REMOTE CONTROL (1) ; ; HELPDESK SCRIPTS (2) ; ; NETWORK SCANNERS (3) ; ; ADAWARE SPYWARE (4) ; ; TEXT EDITORS (5) ; ; DOS (6) ; ; Knowledge Base (7) ; ; ; ---------------------------------------------------------------------------- ; Script Start #include <GUIConstants.au3> ; OPTIONS Opt("GUIOnEventMode", 1); Change to OnEvent mode Opt("GUICloseOnESC", 1) ; ESC to close/cancel ;Opt("TrayIconHide", 1) ; HIDES the program icon that normally appears near clock/time Opt("TrayMenuMode", 1) Opt("TrayOnEventMode", 1) ;***************************************************** ; MISC VALUES Global Const $ZERO = 0, $ONE = 1, $SleepTime = 1000, $buttonLength = 160, $buttoneMiddle = 80 Global $testACTIVE = $ZERO ; testing paramater in calling GUI BUILD Global $testing = $ZERO ; testing closing msgbox() ;***************************************************** ; PC DESKTOP VALUES ;FOR TESTING ONLY - TAKE OUT AFTER COMPLETED ConsoleWrite("Desktop Height " & @DesktopHeight / 1.25 & " " & "Desktop Width " & @DesktopWidth / 5 & " ") ; Desktop Height 768/1.25 = Desktop Width 1024/5=24 Global $heigh = @DesktopHeight, $Width = @DesktopWidth Global Const $mainheigh = @DesktopHeight / 1.25, $mainwidth = @DesktopWidth / 5 Global $left = 0, $top = 0 Global $middleWidth = 30, $middleLength = 275, $buttonDown = 35 ;***************************************************** ; ADMIN VARIABLE Global $activeADMIN = $ONE ; CHANGE this to go to ADMIN Global $bCount = 8 ; How many BUTTONS from Main GUI ; May also put other things like tabs or something ;***************************************************** ; GUI TITLES Global $mainwindowTitle = "HELPDESK", $mainwindowLable1 = "Please click BUTTON for TOOL!" ;***************************************************** ; GUI BUTTONS NAME ARRAY DEFINED - SUB GUI'S Global $names = $bCount, $tnames = $bCount ; GUI BUTTONS NAME ARRAY DECLARED Global $bName[$names][$tnames] ;***************************************************** ; GUI ARRAY DEFINED - SUB GUI'S Global $howmanyButtons = $bCount, $howmanyActive = $bCount, $howmanyCreated = $bCount, $howmanyDummyWindows = $bCount, $howmanyGUI = $bCount ;GUI ARRAY DECLARED Global $yesbutton[$howmanyGUI][$howmanyDummyWindows][$howmanyActive][$howmanyCreated][$howmanyButtons] ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ; Create main GUI - not to be deleted until top right X is clicked or ESC it hit on keyboard If WinExists($mainwindowTitle) Then ; CHECK IF ALREADY RUNNING MsgBox(0, "ERROR", "APPLICATION ALREADY RUNNING") Exit EndIf ;MAIN WINDOW $mainwindow = GUICreate($mainwindowTitle, $mainwidth, $mainheigh, 0, 0) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlCreateLabel($mainwindowLable1, 30, 10) trayIcon() ; Call Tray Fuction ;***************************************************** ;GUI SUB MAIN WINDOW & BUTTONS ;***************************************************** ; REMOTE CONTROL (1) $bName[0][1] = "; REMOTE CONTROL (1)" $bName[1][1] = "Pick a REMOTE CONTROL TOOL" Sleep(10) ; slow down $yesbutton[0][0][0][0][1] = GUICtrlCreateButton($bName[0][1], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength, $buttonLength) $yesbutton[0][0][0][1][1] = $ZERO ; CREATED ; KEEPS SECOND GUI from being opened again $yesbutton[0][0][1][1][1] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][1][1][1][1] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[1][1][1][1][1] = "REMOTE CONTROL" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][1], "Button_1") ; FUNCTION CALL ;***************************************************** ; HELPDESK SCRIPTS (2) $bName[0][2] = "; HELPDESK SCRIPTS (2)" $bName[2][2] = "Pick a Script - paste it in text window" Sleep(10) ; slow down $yesbutton[0][0][0][0][2] = GUICtrlCreateButton($bName[0][2], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 1, $buttonLength) $yesbutton[0][0][0][2][2] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][2][2][2] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][2][2][2][2] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[2][2][2][2][2] = "HELPDESK SCRIPTS" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][2], "Button_2") ;***************************************************** ; NETWORK SCANNERS (3) $bName[0][3] = "; NETWORK SCANNERS (3)" $bName[3][3] = "Pick a NETWORK SCANNER" Sleep(10) ; slow down $yesbutton[0][0][0][0][3] = GUICtrlCreateButton($bName[0][3], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 2, $buttonLength) $yesbutton[0][0][0][3][3] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][3][3][3] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][3][3][3][3] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[3][3][3][3][3] = "NETWORK SCANNERS" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][3], "Button_3") ;***************************************************** ; ADAWARE SPYWARE (4) $bName[0][4] = "; ADAWARE SPYWARE (4)" $bName[4][4] = "Pick a " Sleep(10) ; slow down $yesbutton[0][0][0][0][4] = GUICtrlCreateButton($bName[0][4], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 3, $buttonLength) $yesbutton[0][0][0][4][4] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][4][4][4] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][4][4][4][4] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[4][4][4][4][4] = "ADAWARE SPYWARE" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][4], "Button_4") ;***************************************************** ; TEXT EDITORS (5) $bName[0][5] = "; TEXT EDITORS (5)" $bName[5][5] = "Pick a program to use for editing ASCII TEXT" $yesbutton[0][0][0][0][5] = GUICtrlCreateButton($bName[0][5], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 4, $buttonLength) $yesbutton[0][0][0][5][5] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][5][5][5] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][5][5][5][5] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[5][5][5][5][5] = "TEXT EDITORS" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][5], "Button_5") ;***************************************************** ; DOS (6) $bName[0][6] = "; DOS (6)" $bName[6][6] = "Pick a DOS COMMAND" $yesbutton[0][0][0][0][6] = GUICtrlCreateButton($bName[0][6], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 5, $buttonLength) $yesbutton[0][0][0][6][6] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][6][6][6] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][6][6][6][6] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[6][6][6][6][6] = "DOS" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][6], "Button_6") ;***************************************************** ; Knowledge Base (7) $bName[0][7] = "; Knowledge Base (7)" $bName[7][7] = "Pick ADMIN or CUSTOMER" $yesbutton[0][0][0][0][7] = GUICtrlCreateButton($bName[0][7], $mainwidth / 2 - $buttoneMiddle, $mainheigh / 2 - $middleLength + $buttonDown * 6, $buttonLength) $yesbutton[0][0][0][7][7] = $ZERO ; CREATED ; KEEPS THIRD GUI from being opened again $yesbutton[0][0][7][7][7] = $activeADMIN ; ADMIN ACTIVE $yesbutton[0][7][7][7][7] = 0 ; GUI HANDLE for testing EXIT GUI - CLOSEClicked() $yesbutton[7][7][7][7][7] = "Knowledge Base" ; GUI Window Name GUICtrlSetOnEvent($yesbutton[0][0][0][0][7], "Button_7") ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;;;call mainwindow show to show once through program ShowStartWindow() StayActive($SleepTime) ; call active loop ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** Func ShowStartWindow() GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) EndFunc ;==>ShowStartWindow ;***************************************************** Func StayActive($SleepTime) While 1 Sleep($SleepTime); Idle around WEnd EndFunc ;==>StayActive ;***************************************************** #cs No GUI is created until it called from the main GUI #ce ;***************************************************** ;START GUI FROM BUTTON PRESS ;***************************************************** ;***************************************************** ; REMOTE CONTROL (1) ;***************************************************** Func CreateDummyWindow1($testACTIVE) ; - TIMER,COUNT ITEMS, start another process like timer If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((1))))") EndIf $yesbutton[0][1][1][1][1] = GUICreate($yesbutton[1][1][1][1][1], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[1][1], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][1][1] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow1 ;***************************************************** ; HELPDESK SCRIPTS (2) ;***************************************************** Func CreateDummyWindow2($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((2))))") EndIf $yesbutton[0][2][2][2][2] = GUICreate($yesbutton[2][2][2][2][2], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[2][2], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][2][2] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow2 ;***************************************************** ; NETWORK SCANNERS (3) ;***************************************************** Func CreateDummyWindow3($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((3))))") EndIf $yesbutton[0][3][3][3][3] = GUICreate($yesbutton[3][3][3][3][3], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[3][3], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][3][3] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow3 ;***************************************************** ; ADAWARE SPYWARE (4) ;***************************************************** Func CreateDummyWindow4($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((4))))") EndIf $yesbutton[0][4][4][4][4] = GUICreate($yesbutton[4][4][4][4][4], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[4][4], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][4][4] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow4 ;***************************************************** ; TEXT EDITORS (5) ;***************************************************** Func CreateDummyWindow5($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((5))))") EndIf $yesbutton[0][5][5][5][5] = GUICreate($yesbutton[5][5][5][5][5], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[5][5], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][5][5] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow5 ;***************************************************** ; DOS (6) ;***************************************************** Func CreateDummyWindow6($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((6))))") EndIf $yesbutton[0][6][6][6][6] = GUICreate($yesbutton[6][6][6][6][6], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[6][6], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][6][6] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow6 ;***************************************************** ; Knowledge Base (7) ;***************************************************** Func CreateDummyWindow7($testACTIVE) If $testACTIVE = 1 Or 1 = $testing Then MsgBox(0, "TESTING", "RECEIVED PARAMATER ((((7))))") EndIf $yesbutton[0][7][7][7][7] = GUICreate($yesbutton[7][7][7][7][7], 400, 100) ; Name the SUB GUI & Create VAR for HANDLE GUICtrlCreateLabel($bName[7][7], 30, 10) ; Creates LABLE for gui GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") $yesbutton[0][0][0][7][7] = $ONE ; CHANGES TO ACTIVE GUI EndFunc ;==>CreateDummyWindow7 ;***************************************************** ;END CREATING GUI'S FROM BUTTONS ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;BUTTON CALLS ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ; REMOTE CONTROL (1) ;***************************************************** Func Button_1() ;;; which button was pressed in this case BUTTON 1 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][1][1] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[1][1][1][1][1]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow1($testACTIVE) GUISwitch($yesbutton[1][1][1][1][1]) GUISetState(@SW_SHOW) WinActivate($yesbutton[1][1][1][1][1]) Remote_Control() ; Call tool for drop down menu GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][1][1][1] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_1 ;***************************************************** ; HELPDESK SCRIPTS (2) ;***************************************************** Func Button_2() ;;; which button was pressed in this case BUTTON 2 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][2][2] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][2][2][2][2]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow2($testACTIVE) GUISwitch($yesbutton[0][2][2][2][2]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][2][2][2][2]) scriptor() ; Call tool for drop down menu GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][2][2][2] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_2 ;***************************************************** ; NETWORK SCANNERS (3) ;***************************************************** Func Button_3() ;;; which button was pressed in this case BUTTON 3 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][3][3] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][3][3][3][3]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow3($testACTIVE) GUISwitch($yesbutton[0][3][3][3][3]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][3][3][3][3]) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][3][3][3] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_3 ;***************************************************** ; ADAWARE SPYWARE (4) ;***************************************************** Func Button_4() ;;; which button was pressed in this case BUTTON 4 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][4][4] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][4][4][4][4]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow4($testACTIVE) GUISwitch($yesbutton[0][4][4][4][4]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][4][4][4][4]) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][4][4][4] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_4 ;***************************************************** ; TEXT EDITORS (5) ;***************************************************** Func Button_5() ;;; which button was pressed in this case BUTTON 5 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][5][5] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][5][5][5][5]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow5($testACTIVE) GUISwitch($yesbutton[0][5][5][5][5]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][5][5][5][5]) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][5][5][5] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_5 ;***************************************************** ; DOS (6) ;***************************************************** Func Button_6() ;;; which button was pressed in this case BUTTON 6 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][6][6] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][6][6][6][6]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow6($testACTIVE) GUISwitch($yesbutton[0][6][6][6][6]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][6][6][6][6]) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][6][6][6] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_6 ;***************************************************** ; Knowledge Base (7) ;***************************************************** Func Button_7() ;;; which button was pressed in this case BUTTON 7 - each call may have to be a separate function to allow ;;;;;;; each button to be its own operation If $yesbutton[0][0][0][7][7] = $ONE Then ; IF NEW GUI ALREADY EXISTS ;;; ARRAY is needed for this variable --->>> each window will have a separate check for CREATED MsgBox(0, "ALREADY OPENED", "The tool is already open!") ; NEED TO ADD - MAXIMIZE CALL ElseIf ((WinActive($yesbutton[0][7][7][7][7]) And $testACTIVE = $ONE) Or @GUI_WinHandle = $mainwindow) Then ; OPEN NEW GUI = DEFAULT CreateDummyWindow7($testACTIVE) GUISwitch($yesbutton[0][7][7][7][7]) GUISetState(@SW_SHOW) WinActivate($yesbutton[0][7][7][7][7]) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ElseIf $yesbutton[0][0][7][7][7] = 0 Then ; ADMIN ONLY MsgBox(0, "DUMMY NOT ACTIVE", "You are in the admin section") ElseIf 1 == 1 Then ; ERROR MsgBox(0, "HELP", "Please See ADMINISTRATOR or PROGRAM CREATOR - ERROR - NO 001 - Missing GUI Active State") EndIf EndFunc ;==>Button_7 ;***************************************************** ; FUNCTIONS FOR TRAY ICON ;***************************************************** Func trayIcon() ; TESTING NEW CODE - ON RIGHT CLICK - TRAY ICON $show_tray = TrayCreateItem("Creator Info") TrayItemSetOnEvent(-1, "Set_Show") ;TrayCreateItem("") ; sepator line $about = TrayCreateItem("Version Info") TrayItemSetOnEvent(-1, "about") TrayCreateItem("") ; sepator line $exit_tray = TrayCreateItem("Exit this Program") TrayItemSetOnEvent(-1, "Set_Exit") TraySetState() ; Set the state EndFunc ;==>trayIcon Func Set_Show() MsgBox(64, " Who wrote this Program", " nitekram!!!") EndFunc ;==>Set_Show Func About() MsgBox(64, " VERSION", "0.8 - BETA") EndFunc ;==>About Func Set_Exit() Exit EndFunc ;==>Set_Exit ;***************************************************** ;***************************************************** ; SUB GUI FUNCTIONS ;***************************************************** ;***************************************************** ; REMOTE CONTROL (1) ;***************************************************** Func Remote_Control() ;CALL FUNCTION - make this into a function and call it - may be able to use it in another SUB GUI $Remote_Control_Combo_1 = GUICtrlCreateCombo("Select Site", 50, 35, 150, 21) GUICtrlSetData($Remote_Control_Combo_1, "|APCI|PRAXAIR") $Remote_Control_Button1 = GUICtrlCreateButton('GO', 50, 60, 100, 17) ;GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; NOT NEEDED - IT IS PART OF THE DUMMY WINDOW GUICtrlSetOnEvent($Remote_Control_Button1, "APCI") GUICtrlSetOnEvent($Remote_Control_Button1, "PRAXAIR") EndFunc ;==>Remote_Control ;***************************************************** Func APCI() Run(@COMSPEC & " /c Start lock_ac.vnc") ;Run(@ComSpec & " /c C:\""Program Files""\RealVNC\VNC4\apci.vnc", '', @SW_HIDE, 2) ;Run(@ComSpec & " /c start C:\Program Files\RealVNC\VNC4\vncviewer.exe APCI.VNC", '', @SW_SHOW, 2) ;Run(@ComSpec & " /c C:\Program Files\RealVNC\VNC4\APCI.VNC", '', @SW_SHOW, 2) ;Run("C:\Program Files\RealVNC\VNC4\APCI.VNC") ;WinWaitActive("US08551") ;Run("C:\Program Files\RealVNC\VNC4\APCI.VNC") ;@ProgramFilesDir - ; USE THIS as different PC have different locations #cs $my_file_APCI1 = "C:\test1.txt" $APCI_file1 = FileOpen($my_file_APCI1, 0) ; Check if file opened for reading OK If $APCI_file1 = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ClipPut(FileRead($my_file_APCI1)) FileClose($my_file_APCI1) #ce EndFunc ;==>APCI ;***************************************************** Func PRAXAIR() Run("C:\Program Files\RealVNC\VNC4\vncviewer.exe PRAXAIR.VNC") #cs $my_file_PRAXAIR1 = "C:\test2.txt" $PRAXAIR_file1 = FileOpen($my_file_PRAXAIR1, 0) ; Check if file opened for reading OK If $PRAXAIR_file1 = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ClipPut(FileRead($my_file_PRAXAIR1)) FileClose($my_file_PRAXAIR1) #ce EndFunc ;==>APCI ;***************************************************** ;***************************************************** ; HELPDESK SCRIPTS (2) ;***************************************************** Func scriptor() ;CALL FUNCTION - make this into a function and call it - may be able to use it in another SUB GUI $scriptor_Combo_1 = GUICtrlCreateCombo("Select Script", 50, 35, 150, 21) GUICtrlSetData($scriptor_Combo_1, "|test 1|test 2") $scriptor_Button1 = GUICtrlCreateButton('GO', 50, 60, 100, 17) ;GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; NOT NEEDED - IT IS PART OF THE DUMMY WINDOW GUICtrlSetOnEvent($scriptor_Button1, "scriptor1") GUICtrlSetOnEvent($scriptor_Button1, "scriptor2") EndFunc ;==>scriptor ;***************************************************** Func scriptor1() $scriptor1_my_file1 = "C:\test1.txt" $scriptor_file1 = FileOpen($scriptor1_my_file1, 0) ; Check if file opened for reading OK If $scriptor_file1 = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ClipPut(FileRead($scriptor1_my_file1)) FileClose($scriptor1_my_file1) EndFunc ;==>scriptor1 ;***************************************************** Func scriptor2() $scriptor_my_file2 = "C:\test2.txt" $scriptor_file2 = FileOpen($scriptor_my_file2, 0) ; Check if file opened for reading OK If $scriptor_file2 = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ClipPut(FileRead($scriptor_my_file2)) FileClose($scriptor_my_file2) EndFunc ;==>scriptor2 ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ;***************************************************** ; I only want the dummy gui to close not the main gui Func CLOSEClicked() ; EXIT GUI If @GUI_WinHandle = $mainwindow Then ; EXIT PROGRAM If 1 == $testing Then MsgBox(0, "GUI Event", "You clicked CLOSE in the main window! Exiting...") EndIf Exit ElseIf @GUI_WinHandle = $yesbutton[0][1][1][1][1] Then ; CLOSE GUI If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((1))))) for testing ") EndIf $yesbutton[0][0][0][1][1] = $ZERO ; RESET CREATED STATUS GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][2][2][2][2] Then ; CLOSE GUI ; HELPDESK SCRIPTS (2) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((2)))) for testing ") EndIf $yesbutton[0][0][0][2][2] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][3][3][3][3] Then ; CLOSE GUI ; NETWORK SCANNERS (3) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((3)))) for testing ") EndIf $yesbutton[0][0][0][3][3] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][4][4][4][4] Then ; CLOSE GUI ; ADAWARE SPYWARE (4) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((4)))) for testing ") EndIf $yesbutton[0][0][0][4][4] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][5][5][5][5] Then ; CLOSE GUI ; TEXT EDITORS (5) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((5)))) for testing ") EndIf $yesbutton[0][0][0][5][5] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][6][6][6][6] Then ; CLOSE GUI ; DOS (6) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((6)))) for testing ") EndIf $yesbutton[0][0][0][6][6] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf @GUI_WinHandle = $yesbutton[0][7][7][7][7] Then ; CLOSE GUI ; Knowledge Base (7) If 1 == $testing Then MsgBox('', "GUI Event", "@GUI_WINHANDLE = Dummy window ((((7)))) for testing ") EndIf $yesbutton[0][0][0][7][7] = $ZERO ; RESET CREATED STATUS ;GUISetState(@SW_HIDE) ; test this and see if it makes a difference GUIDelete(@GUI_WinHandle) GUISwitch($mainwindow) GUISetState(@SW_SHOW) WinActivate($mainwindow) ElseIf 1 == 1 Then ; ERROR MsgBox(4, "ERROR", "NO MATCHES FOR WINDOW BEING ACTIVE TO CLOSE") EndIf EndFunc ;==>CLOSEClicked Thanks for any help 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 Runs fine here... My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Runs fine here...I am at a total loss then - it works fine if I just double click it - and in the first code - but not my codeblock - it keeps coming up with the error. I will continue to try different things - if anyone has an idea please let me know. 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
MadBoy Posted March 16, 2006 Posted March 16, 2006 Sorry but i tried to start the application and you are right it doesn't start as it should. But still it's very fuckign hard for me to understand your code Doesn't realy make sense to me but i am noob so no worries. My little company: Evotec (PL version: Evotec)
nitekram Posted March 16, 2006 Author Posted March 16, 2006 Sorry but i tried to start the application and you are right it doesn't start as it should. But still it's very fuckign hard for me to understand your code Doesn't realy make sense to me but i am noob so no worries.The code is like this - start a gui with buttons - click a button and it brings up another gui - with its own functions. Granted everything is not in place yet but if you stick to the code that I am having issues with it will be OK. Another thing I just noticed - Can I do what I am doing with onevent for the combo box - it seems when I add it to the other line it freaks out. Try and see - you may have to create 2 test files on the root and put some text in them that states test 1 & test 2. When I press either of the 2 on the combo box it looks at test2. Any ideas 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
cal Posted March 17, 2006 Posted March 17, 2006 I am trying automate the task of always having to chose the IP/Server on VNC. The issue is I can run the session by double clicking the icon whick is *.vnc.I have not tried any of the code posted but I had the same issue when I first tried to use autoit with UltraVNC.It turned out to be a file association issue within windows. It was linked somehow twice to VNC. One that worked and one that did not. I think I redid VNC and then only had one association like normal. Autoit then worked fine.
nitekram Posted March 18, 2006 Author Posted March 18, 2006 I have not tried any of the code posted but I had the same issue when I first tried to use autoit with UltraVNC.It turned out to be a file association issue within windows. It was linked somehow twice to VNC. One that worked and one that did not. I think I redid VNC and then only had one association like normal. Autoit then worked fine.I will not be able to test that until Monday - but I will look into it. I was able to get it to run, though I needed to set the config file on the root of C:\ I also tried one layer up - in a folder call tempvnc. That all worked and I was thinking it must be something with the way @ComSpec looks at the spaces. I do not know, does any one? Anyway is there a list of flags to use with this macro - @ComSpec? So far I have seen /c, /f, /k and have no clue what they mean and if there are others. Can anyone answer? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
herewasplato Posted March 18, 2006 Posted March 18, 2006 (edited) ...I was able to get it to run, though I needed to set the config file on the root of C:\ I also tried one layer up - in a folder call tempvnc. That all worked and I was thinking it must be something with the way @ComSpec looks at the spaces...Sounds like your problems are with the quotes. These two lines work for me:Run('"C:\Program Files\RealVNC\VNC4\vncviewer.exe" -config "C:\Documents and Settings\username\Desktop\VNCtest.vnc"')Run(@ComSpec & " /c " & '"C:\Documents and Settings\username\Desktop\VNCtest.vnc"') As for /c, /k, .... happy reading: http://www.microsoft.com/resources/documen...d.mspx?mfr=true Edited March 18, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now