Sign in to follow this  
Followers 0
unclemunch

GUI Loops Constantly

15 posts in this topic

Hello All!

I'm another newb probably in over my head on this project, but I'm working on a GUI menu to automate some of the other scripts that I've written. I've pieced together several scripts I found on the forums, plus used koda for the initial design, and then tweaked the code to match what I wanted. This script works fine except for three problems.

1.) Once compiled, it just keeps launching multiple copies of itself after I type in the password. This does not happen when I test the script without compilation

2.) I cannot get the script to launch at all in safe mode

3.) I cannot, for the life of me, get the drop down boxes correct. I finally got it where it will select something is, but the problem is it doesn't wait for the user to "click" on that option. As soon as the mouse drags over it, it selects. Hopefully you guys will go easy on me!

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#RequireAdmin

; password encrypter
; Author Valuater
  
If Not FileExists(@ScriptDir & "\License.dat") Then
    $password = InputBox("Password *Set-up*", "  Please *Set-up* Your Password:", "", "", 200, 120)
    If @error = 1 Or $password = "" Then Exit
    FileWrite(@Scriptdir & "\License.dat", _StringEncrypt(1, @ComputerName & "4", $password))
Else
    $Input = InputBox("Password Protected", "  Please Type in Your Password:", "", "*", 200, 120)
    $Answer = _StringEncrypt(0, FileReadLine(@ScriptDir & "\License.dat", 1), $Input ) 
    If $Answer <> @ComputerName & "4" Then Exit
EndIf

;Kill Viral Processes
Run(@AutoItExe & ' "' & @ScriptDir & '\KillProcs.au3"') 


#Region ### START Koda GUI section ### Form=C:\AWCD 3.0 Beta\Menu.kxf
;Create Form for Menu
$Form1 = GUICreate("AWCD 3.0 Alpha", 615, 438, 192, 124)

;Malware Tools Tab and Buttons Creation
$Tab1 = GUICtrlCreateTab(0, 0, 601, 433)
GUICtrlSetDefBkColor(0x66FFFF)
$Malware = GUICtrlCreateTabItem("Malware")
$Cleanup = GUICtrlCreateButton("Cleanup", 88, 88, 99, 65)
$Scan_Only = GUICtrlCreateButton("Scan Only", 190, 88, 99, 65)
$Update = GUICtrlCreateButton ("Update Scanners", 292, 88, 99, 65)
$Core = GUICtrlCreateLabel("Core Scanners", 72, 56, 106, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Installable = GUICtrlCreateLabel("Installable Scanners", 72, 160, 145, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Ad_Aware = GUICtrlCreateButton("Ad-Aware", 88, 185, 99, 65)
$Trojan_Hunter = GUICtrlCreateButton("TrojanHunter", 190, 185, 99, 65)
$Utilities = GUICtrlCreateLabel("Utilities", 74, 254, 56, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Merijn = GUICtrlCreateCombo("", 80, 312, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "ADS Spy|BugOff|Itty Bitty Process manager|Kazaa BeGone|Kill2me|Startuplist")
$MerijnLabel = GUICtrlCreateLabel("Merijn Tools", 106, 286, 78, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Atribunelabel = GUICtrlCreateLabel("Atribune Tools", 308, 286, 91, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Atribune = GUICtrlCreateCombo("", 282, 312, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "ATF Cleaner|Look2me Destroyer|Vundo Fix")
$CWShredder = GUICtrlCreateButton("CWShredder", 88, 353, 99, 65)
$Combofix = GUICtrlCreateButton("ComboFix", 190, 353, 99, 65)
$HijackThis = GUICtrlCreateButton("HijackThis", 292, 353, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)

;Windows Tools Tab and Buttons Creation
$Windows_Utilities = GUICtrlCreateTabItem("Windows Utilities")
$Ccleaner = GUICtrlCreateButton("Ccleaner", 88, 88, 99, 65)
$WinTools = GUICtrlCreateLabel("Windows Tools", 72, 56, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1,0xFFFFFF)
$JV16 = GUICtrlCreateButton("JV16 Power Tools", 190, 88, 99, 65)
$DIAL_A_FIX = GUICtrlCreateButton("Dial-a-Fix", 292, 88, 99, 65)
$Win_Scripts = GUICtrlCreateLabel("Automated Scripts", 72, 160, 145, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Temp_Cleaner = GUICtrlCreateButton("Temp File Cleaner", 88, 185, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)

;Diagnostic tab and Buttons creation
$Diagnostic_Tools = GUICtrlCreateTabItem("Diagnostic Tools")
$DiagTools = GUICtrlCreateLabel("Diagnostic Tools", 72, 56, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1,0xFFFFFF)
$Eurosoft = GUICtrlCreateButton("Eurosoft QA+32", 88, 88, 99, 65)
$Prime95 = GUICtrlCreateButton("Prime95", 190, 88, 99, 65)
$Lifeguard = GUICtrlCreateButton("WD Lifeguard", 292, 88, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;Begin Button Activity Section
While 1
    $nMsg = GUIGetMsg()
    
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        ;Malware Tab        
        Case $Tab1
            Case $Cleanup
                RunWait(@ScriptDir & "\Full Cleanup.exe")
            Case $Scan_Only
                RunWait(@ScriptDir & "\Scan Only.exe")
            Case $Update
                RunWait(@ScriptDir & "Update.exe")
            Case $Ad_Aware
                ShellExecute(@ScriptDir & "\Malware\Installable\" & "Ad-Aware.exe")
            Case $Trojan_Hunter
                ShellExecute(@ScriptDir & "\Malware\Installable\" & "TrojanHunter.exe")
            Case $CWShredder
                RunWait(@ScriptDir & "\Malware\Utilities\" & "CWShredder.exe")
            Case $ComboFix
                ShellExecuteWait(@ScriptDir & "Malware\Utilities\" & "ComboFix.exe")
            Case $HijackThis
                RunWait(@ScriptDir & "\Malware\Utilities\" & "HijackThis.exe")
            
                
                
        ;Windows Utilities Tab
        Case $Windows_Utilities
            Case $Ccleaner
                If @CPUArch="X64" Then 
                    ShellExecuteWait(@ScriptDir & "\Windows Utilities\" & "ccleaner64.exe") 
                    Else 
                    ShellExecuteWait(@ScriptDir & "\Windows Utilities\" & "ccleaner.exe")
                    EndIf
                Case $JV16
                    RunWait(@ScriptDir & "\Windows Utilities\" & "JV16pt.exe")
                Case $DIAL_A_FIX
                    RunWait(@ScriptDir & "\Windows Utilities\Dial-a-fix\" & "dial-a-fix.exe")
                Case $Temp_Cleaner
                    RunWait(@ScriptDir & "\Windows Utilities\ezpcfix\ezpcfix.exe")
        ;Diagnostics Tab
        Case $Diagnostic_Tools
            Case $Eurosoft
            Case $Prime95
                IF @CPUArch="X64" Then
                    ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95x64\" & "Prime95.exe")
                Else
                    ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95\" & "Prime95.exe")
                EndIf
            Case $LifeGuard
                ShellExecuteWait(@ScriptDir & "\Diagnostics\Lifeguard\" & "setup.exe"
                
            EndSwitch
    Select
        Case GUICtrlRead($Merijn) = "ADS Spy"
                run('notepad.exe')
                Exit
    EndSelect
WEnd

Share this post


Link to post
Share on other sites



Try this - replace the code with this

;Diagnostics Tab
        Case $Diagnostic_Tools
            Case $Eurosoft
            Case $Prime95
                IF @CPUArch="X64" Then
                    ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95x64\" & "Prime95.exe")
                Else
                    ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95\" & "Prime95.exe")
                EndIf
            Case $LifeGuard
                ShellExecuteWait(@ScriptDir & "\Diagnostics\Lifeguard\" & "setup.exe")


        Case $Merijn
            If GUICtrlRead($Merijn) = "ADS Spy" Then
                run('notepad.exe')
                Exit
            EndIf
    EndSwitch

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."

 

WindowsError.gif

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

Share this post


Link to post
Share on other sites

This script above wouldn't happen to be called Killprocs.au3 would it?

No, but I am calling that script, borrowed from the "Autoclean" set of scripts

Try this - replace the code with this

[ autoIt ] ( Popup )

;Diagnostics Tab

Case $Diagnostic_Tools

Case $Eurosoft

Case $Prime95

IF @CPUArch="X64" Then

ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95x64\" & "Prime95.exe")

Else

ShellExecuteWait(@ScriptDir & "\Diagnostics\Prime95\" & "Prime95.exe")

EndIf

Case $LifeGuard

ShellExecuteWait(@ScriptDir & "\Diagnostics\Lifeguard\" & "setup.exe")

Case $Merijn

If GUICtrlRead($Merijn) = "ADS Spy" Then

run('notepad.exe')

Exit

EndIf

EndSwitch

When I make this change, the script prompts for the password, I type it in, the menu flashes and then immediately closes and launches notepad.

Thanks for the try! Any other suggestions?

Share this post


Link to post
Share on other sites

Try this - as i am not sure what your other script is doing - took out the line

#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#RequireAdmin

; password encrypter
; Author Valuater

If Not FileExists(@ScriptDir & "\License.dat") Then
    $password = InputBox("Password *Set-up*", "  Please *Set-up* Your Password:", "", "", 200, 120)
    If @error = 1 Or $password = "" Then Exit
    FileWrite(@Scriptdir & "\License.dat", _StringEncrypt(1, @ComputerName & "4", $password))
Else
    $Input = InputBox("Password Protected", "  Please Type in Your Password:", "", "*", 200, 120)
    $Answer = _StringEncrypt(0, FileReadLine(@ScriptDir & "\License.dat", 1), $Input )
    If $Answer <> @ComputerName & "4" Then Exit
EndIf

;Kill Viral Processes
;Run(@AutoItExe & ' "' & @ScriptDir & '\KillProcs.au3"')


#Region ### START Koda GUI section ### Form=C:\AWCD 3.0 Beta\Menu.kxf
;Create Form for Menu
$Form1 = GUICreate("AWCD 3.0 Alpha", 615, 438, 192, 124)

;Malware Tools Tab and Buttons Creation
$Tab1 = GUICtrlCreateTab(0, 0, 601, 433)
GUICtrlSetDefBkColor(0x66FFFF)
$Malware = GUICtrlCreateTabItem("Malware")
$Cleanup = GUICtrlCreateButton("Cleanup", 88, 88, 99, 65)
$Scan_Only = GUICtrlCreateButton("Scan Only", 190, 88, 99, 65)
$Update = GUICtrlCreateButton ("Update Scanners", 292, 88, 99, 65)
$Core = GUICtrlCreateLabel("Core Scanners", 72, 56, 106, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Installable = GUICtrlCreateLabel("Installable Scanners", 72, 160, 145, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Ad_Aware = GUICtrlCreateButton("Ad-Aware", 88, 185, 99, 65)
$Trojan_Hunter = GUICtrlCreateButton("TrojanHunter", 190, 185, 99, 65)
$Utilities = GUICtrlCreateLabel("Utilities", 74, 254, 56, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Merijn = GUICtrlCreateCombo("", 80, 312, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "ADS Spy|BugOff|Itty Bitty Process manager|Kazaa BeGone|Kill2me|Startuplist")
$MerijnLabel = GUICtrlCreateLabel("Merijn Tools", 106, 286, 78, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Atribunelabel = GUICtrlCreateLabel("Atribune Tools", 308, 286, 91, 20)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Atribune = GUICtrlCreateCombo("", 282, 312, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "ATF Cleaner|Look2me Destroyer|Vundo Fix")
$CWShredder = GUICtrlCreateButton("CWShredder", 88, 353, 99, 65)
$Combofix = GUICtrlCreateButton("ComboFix", 190, 353, 99, 65)
$HijackThis = GUICtrlCreateButton("HijackThis", 292, 353, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)

;Windows Tools Tab and Buttons Creation
$Windows_Utilities = GUICtrlCreateTabItem("Windows Utilities")
$Ccleaner = GUICtrlCreateButton("Ccleaner", 88, 88, 99, 65)
$WinTools = GUICtrlCreateLabel("Windows Tools", 72, 56, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1,0xFFFFFF)
$JV16 = GUICtrlCreateButton("JV16 Power Tools", 190, 88, 99, 65)
$DIAL_A_FIX = GUICtrlCreateButton("Dial-a-Fix", 292, 88, 99, 65)
$Win_Scripts = GUICtrlCreateLabel("Automated Scripts", 72, 160, 145, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$Temp_Cleaner = GUICtrlCreateButton("Temp File Cleaner", 88, 185, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)

;Diagnostic tab and Buttons creation
$Diagnostic_Tools = GUICtrlCreateTabItem("Diagnostic Tools")
$DiagTools = GUICtrlCreateLabel("Diagnostic Tools", 72, 56, 150, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1,0xFFFFFF)
$Eurosoft = GUICtrlCreateButton("Eurosoft QA+32", 88, 88, 99, 65)
$Prime95 = GUICtrlCreateButton("Prime95", 190, 88, 99, 65)
$Lifeguard = GUICtrlCreateButton("WD Lifeguard", 292, 88, 99, 65)
Global $Pic1 = GUICtrlCreatePic(@ScriptDir & "\Images\logosmall.bmp", 424, 64, 124, 124)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;Begin Button Activity Section
While 1
    $nMsg = GUIGetMsg()

    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        ;Malware Tab
        Case $Tab1
            Case $Cleanup
                MsgBox('','$Cleanup','')
            Case $Scan_Only
                 MsgBox('','$Scan_Only','')
            Case $Update
                MsgBox('','$Update','')
            Case $Ad_Aware
                MsgBox('','$Ad_Aware','')
            Case $Trojan_Hunter
                MsgBox('','$Trojan_Hunter','')
            Case $CWShredder
                MsgBox('','$CWShredder','')
            Case $ComboFix
                MsgBox('','$ComboFix','')
            Case $HijackThis
                MsgBox('','$HijackThis','')



        ;Windows Utilities Tab
        Case $Windows_Utilities
            Case $Ccleaner
                If @CPUArch="X64" Then
                    MsgBox('','@CPUArch="X64','$Ccleaner')
                    Else
                    MsgBox('','ELSE @CPUArch="X64','$Ccleaner')
                    EndIf
                Case $JV16
                   MsgBox('','$JV16','')
                Case $DIAL_A_FIX
                    MsgBox('','$DIAL_A_FIX','')
                Case $Temp_Cleaner
                     MsgBox('','$Temp_Cleaner','')
        ;Diagnostics Tab
        Case $Diagnostic_Tools
            Case $Eurosoft
            Case $Prime95
                IF @CPUArch="X64" Then
                     MsgBox('','@CPUArch="X64','$Prime95')
                Else
                    MsgBox('','ELSE @CPUArch="X64','$Prime95')
                EndIf
            Case $LifeGuard
                MsgBox('','$LifeGuard','')


        Case $Merijn
            If GUICtrlRead($Merijn) = "ADS Spy" Then
                run('notepad.exe')
                Exit
            EndIf
    EndSwitch
WEnd

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."

 

WindowsError.gif

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

Share this post


Link to post
Share on other sites

Ok Great! That stops it from looping. Any suggestions on the other two?

Share this post


Link to post
Share on other sites

Run(@AutoItExe & ' "' & @ScriptDir & '\KillProcs.au3"')

I'm not sure if this is the problem, but if you're trying to use your compiled script to run the killprocs.au3 script, then you're missing the command line switch [/AutoIt3ExecuteScript] file [params ...] to do that. Otherwise, it's going to run your script again and pass killprocs.au3 as a command line parameter.

According to the helpfile:

@AutoItExe The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script.

That's why it's rerunning your program when it's compiled, and why it doesn't happen when it's not.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

[ autoIt ] ( Popup )

Run(@AutoItExe & ' "' & @ScriptDir & '\KillProcs.au3"')

I'm not sure if this is the problem, but if you're trying to use your compiled script to run the killprocs.au3 script, then you're missing the command line switch [/AutoIt3ExecuteScript] file [params ...] to do that. Otherwise, it's going to run your script again and pass killprocs.au3 as a command line parameter.

According to the helpfile:

@AutoItExe The full path and filename of the AutoIt executable currently running. For compiled scripts it is the path of the compiled script.

That's why it's rerunning your program when it's compiled, and why it doesn't happen when it's not.

I compiled that file, and have changed it to just run the compiled file. The program is not looping anymore. Any ideas on the other two problems?

Share this post


Link to post
Share on other sites

For the combobox issue, don't read the control for the combobox directly using GuiGetMsg, you might want to put a button next to the combobox and use the button to trigger a function that reads the contents of the combobox and acts on its contents. Right now the way it works in your script is, as soon as the combobox control contains ADS Spy it runs notepad and exits the script because you're constantly reading the combobox. You need to delay reading the combo until it contains what you want it to, then act on it, and for that you need to use a button or something similar.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Ohhhh...Ok....Well it looks like we have two of the three figured out lol. Btw, It's nice to get advice from a fellow traveler. Do you have any idea on the safe mode issue?

Share this post


Link to post
Share on other sites

Have you tried the new version (compiled) within safemode


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."

 

WindowsError.gif

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

Share this post


Link to post
Share on other sites

Have you tried the new version (compiled) within safemode

Yes I have. After the password prompt, the script just exits. I have another script with a more basic GUI that does the same thing. Thanks for all your help so far!

Share this post


Link to post
Share on other sites

Does it work in safe mode if you run it uncompiled?

If it does the same thing uncompiled, i.e. closes after the password prompt, try using SciTE's tools menu and use the Trace: Add Trace Lines to your script, after you have safely backed it up somewhere. What this will do is it will add debug comment lines after EVERY line in your script, and you can follow the scripts progress until it exits in the console window in the editor. You'll get a lot of output to read through, but at least you're going to find out where it's going wrong.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Ok so here's an update - I rebooted in safe mode on the system I am using to script, and the compiled file runs just fine. This system is Win 7 Ultimate x64. The other systems I tried it on were both 32 bit. 1 Vista and 1 Win XP. Should I still run the debug? Thanks!

Share this post


Link to post
Share on other sites

Does it not run when it's NOT compiled? That was what I was asking. Also, try removing the #requireadmin or commenting it out and see if it will run in safe mode on all the OS's that it's not currently working on.

You could include the debug lines in the script even if you run the compiled version of it, but you won't get much of anything useful from it that way.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0