pyr0ball
Members-
Posts
11 -
Joined
-
Last visited
pyr0ball's Achievements
Seeker (1/7)
0
Reputation
-
^ PM'd
-
Hey sorry for noobie question, but I would like to integrate this into part of one of my scripts for diagnostics. I'd like to know what syntax to use to call up a single attribute of _ComputerGetProcessors or _ComputerGetOSs instead of the entire array. I plan to organize individual attributes instead of having them all mashed together and I'm a VBA newbie so the help file isnt really doing much on teaching me syntax in a circumstance like this
-
Woo!!! tested out the script prototype and so far everything is running exactly the way It's meant to other than the progress bar! Building the scanning function should be easier than this is Anyhoo here's the updated code for you to see. All the installers are working as expected (quirks I need to iron out with the switches and arguments, but that has nothing to do with this script)
-
Brew I actually read the whole section on that particular function but it doesnt explicitly explain how to tell the function what to log or how to incorporate it into an existing code string. I was taking it as if it was kinda like php or html and I was making a wrapper out of it. I knew what I was doing most likely was wrong but I left it there because it didnt break anything "[]" <~~ noob moment, pure and simple. It doesnt say that anywhere i can see int he help file so thanks for explaining. Lastly, the GUICtrlRead function... everyone said "use it" but again, total noob here. I havnt the foggiest idea how! If I can see an example that has direct correlation to my project or something similar maybe that would help but the example in the help file does me exactly no good. Edit --- after knocking my head against the desk for a while I'm kinda getting the idea that the GUICtrlRead function is what I'll be using to show progress on the progress bar right? o.O Not sure how to incorporate it to show the progress of each successive install.... I think if I implement it the way the help file shows it will reset and show the progress bar resetting after each installation right? Example() Func Example() Local $menu1, $n1, $n2, $msg, $menustate, $menutext GUICreate("My GUICtrlRead") ; will create a dialog box that when displayed is centered $menu1 = GUICtrlCreateMenu("File") $n1 = GUICtrlCreateList("", 10, 10, -1, 100) GUICtrlSetData(-1, "item1|item2|item3", "item2") $n2 = GUICtrlCreateButton("Read", 10, 110, 50) GUICtrlSetState(-1, $GUI_FOCUS) ; the focus is on this button GUISetState() ; will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() If $msg = $n2 Then MsgBox(0, "Selected listbox entry", GUICtrlRead($n1)) ; display the selected listbox entry $menustate = GUICtrlRead($menu1) ; return the state of the menu item $menutext = GUICtrlRead($menu1, 1) ; return the text of the menu item MsgBox(0, "State and text of the menuitem", "state:" & $menustate & @LF & "text:" & $menutext) EndIf Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example
-
pyr0ball reacted to a post in a topic: Coding NOOB, need help
-
^~~yessir, I ditzed with it til I figured that out. Running the script now, but it's having other syntax issues unless I link it to the batch files. When I do that, the batch command windows open and close almost instantly without doing anything. Neither of these scripts are working but for different reasons. the first, because the batch commands aren't executing properly when launched by the script, and the second because theres some kind of syntax problem. FYI I also tried to add in a log function to figure out why itwas failing, but it doesnt seem to do anything, not even break the script Edit--- I should probably mention that running the batches independently of the script works perfectly Batch: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <File.au3> #include <EventLog.au3> #Region ### START Koda GUI section ### Form=c:userspyr0balldropboxautoitmainwindow.kxf $MainWindow = GUICreate("TNN AutoInstaller", 252, 230, 192, 124) $InstallStart = GUICtrlCreateButton("InstallStart", 64, 152, 115, 33) $Progress = GUICtrlCreateProgress(8, 200, 230, 17) $TNNLogo = GUICtrlCreatePic(".SupportFilesbluegreyLogo3.jpg", 10, 8, 228, 135) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### _Main() Func _Main() Local $hEventLog $hEventLog = _EventLog__Open("", "$InstallStart") _EventLog__Backup($hEventLog, "C:SupportFilesEventLog.bak") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $InstallStart ;~ Install Spybot Silently, no reboot, no update ShellExecuteWait(@ScriptDir & "SupportFilesspybot.bat") ;~ Install CCleaner Silently ShellExecuteWait(@ScriptDir & "SupportFilesccleaner.bat") ;~ Install Defraggler Silently ShellExecuteWait(@ScriptDir & "SupportFilesdefraggler.bat") ;~ Installe Malwarebytes Silently ShellExecuteWait(@ScriptDir & "SupportFilesmbam.bat") ;~ Install Avast Silently, no sounds enabled, no reboot ShellExecuteWait(@ScriptDir & "SupportFilesavast.bat") ;~ Opens Superantispyware Dialogue Window for macro install RunWait( @ComSpec & " /c " & "SupportFilesSUPERAntiSpyware.exe") EndSwitch _EventLog__Close($hEventLog) WEnd EndFunc ;==>_Main ShellExecuteWait: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:userspyr0balldropboxautoitmainwindow.kxf $MainWindow = GUICreate("TNN AutoInstaller", 252, 230, 192, 124) $InstallStart = GUICtrlCreateButton("InstallStart", 64, 152, 115, 33) $Progress = GUICtrlCreateProgress(8, 200, 230, 17) $TNNLogo = GUICtrlCreatePic("C:Userspyr0ballDropboxTNNNerd's Security SuiteSupportFilesbluegreyLogo3.jpg", 10, 8, 228, 135) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $InstallStart ShellExecuteWait( @ScriptDir & "spybotsd162.exe" [, "/verysilent /suppressmsgboxes /norestart /dir=C:Program FilesSpybotSearchDestroy /components=main,language, SDWinSec, SDShredder, SDDelFile /tasks=desktopicon, launchsdhelper /log=spsdlog.txt" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir & "ccleaner.exe" [, "/S /D=C:Program FilesCCleaner" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir & "dfsetup.exe" [, "/S /D=C:Program FilesDefraggler" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir & "mbam-setup.exe" [, "/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /NOCANCEL" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir & "avastsetup.exe" [, "/verysilent /noreboot /nosounds" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir & "SUPERAntiSpyware.exe" [, [, [, "open" [,@SW_HIDE]]]] ) EndSwitch WEnd
-
pyr0ball reacted to a post in a topic: Coding NOOB, need help
-
ok i figured it was either the opening argument or the closing one, but how exactly is it the problem? not sure how to modify it? Edit--- So I'm guessing I thought I overwrote a line at the top or something and didnt get that WEnd line out before the #include section came in. Anyhoo, now I'm coming up with syntax errors on every one of my ShellExecuteWait lines. I wanna figure out why those are having issues as well for the sake of learning the code, but I can run batches from the same lines or use the run() strings instead and see how they work. I'd rather use all the code in AutoIt rather than grab the batches now I've had some time to tinker with it, mainly cus it will be a lot easier to update when future versions of software releases
-
pyr0ball reacted to a post in a topic: Coding NOOB, need help
-
wow! thanks for all the options guys! I'll try building a few different scripts using the different types of run commands and see which one likes my software best
-
ok running into a syntax error on WEnd as I try to compile my first prototype. Hopefully it's something simple? WEnd$msg = $GUI_EVENT_CLOSE#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:userspyr0balldropboxautoitmainwindow.kxf $MainWindow = GUICreate("TNN AutoInstaller", 252, 230, 192, 124) $InstallStart = GUICtrlCreateButton("InstallStart", 64, 152, 115, 33) $Progress = GUICtrlCreateProgress(8, 200, 230, 17) $TNNLogo = GUICtrlCreatePic(".SupportFilesbluegreyLogo3.jpg", 10, 8, 228, 135) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $InstallStart ShellExecuteWait( @ScriptDir "spybotsd162.exe" [, "/verysilent /suppressmsgboxes /norestart /dir=C:Program FilesSpybotSearchDestroy /components=main,language, SDWinSec, SDShredder, SDDelFile /tasks=desktopicon, launchsdhelper /log=spsdlog.txt" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir "ccleaner.exe" [, "/s /d=C:Program FilesCCleaner" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir "dfsetup.exe" [, "/s /d=C:Program FilesDefraggler" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir "mbam-setup.exe" [, "/VERYSILENT /NORESTART /SUPPRESSMSGBOXES /NOCANCEL" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir "avastsetup.exe" [, "/verysilent /noreboot /nosounds" [, [, "open" [,@SW_HIDE]]]] ) ShellExecuteWait( @ScriptDir "SUPERAntiSpyware.exe" [, [, [, "open" [,@SW_HIDE]]]] ) #region --- AutoIt Macro Generator V 0.21 beta --- Opt("WinTitleMatchMode", 4) WinWait("SUPERAntiSpyware Free Edition Setup","Read below for the special off") ControlClick("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button8") ControlClick("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button8") ControlClick("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button8") ControlClick("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button8") ControlCommand("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button2","UnCheck","") ControlClick("SUPERAntiSpyware Free Edition Setup","Read below for the special off","#327703") ControlCommand("SUPERAntiSpyware Free Edition Setup","Read below for the special off","Button3","UnCheck","") #endregion --- End --- ShellExecuteWait( @ScriptDir "spywareblastersetup.exe" [, [, [, "open" [,@SW_HIDE]]]] ) #region --- AutoIt Macro Generator V 0.21 beta --- Opt("WinTitleMatchMode", 4) WinWait("Setup - SpywareBlaster","This will install SpywareBlast") ControlClick("Setup - SpywareBlaster","This will install SpywareBlast","TNewButton1") WinWait("Setup - SpywareBlaster","Please read the following impo") ControlClick("Setup - SpywareBlaster","Please read the following impo","TNewRadioButton1") ControlClick("Setup - SpywareBlaster","Please read the following impo","TNewButton2") WinWait("Setup - SpywareBlaster","Where should SpywareBlaster be") ControlClick("Setup - SpywareBlaster","Where should SpywareBlaster be","TNewButton3") WinWait("Setup - SpywareBlaster","Which additional tasks should ") ControlClick("Setup - SpywareBlaster","Which additional tasks should ","TNewCheckListBox1") ControlClick("Setup - SpywareBlaster","Which additional tasks should ","TNewButton3") WinWait("Setup - SpywareBlaster","Setup is now ready to begin in") ControlClick("Setup - SpywareBlaster","Setup is now ready to begin in","TNewButton3") WinWait("Setup - SpywareBlaster","Setup has finished installing ") ControlClick("Setup - SpywareBlaster","Setup has finished installing ","TNewButton3") WinWait("SpywareBlaster Tutorial","Frame1") ControlClick("SpywareBlaster Tutorial","Frame1","ThunderRT6UserControlDC1") ControlClick("SpywareBlaster Tutorial","Frame1","ThunderRT6UserControlDC7") ControlClick("SpywareBlaster Tutorial","Frame1","ThunderRT6UserControlDC4") ControlClick("SpywareBlaster Tutorial","Frame1","ThunderRT6UserControlDC2") WinWait("SpywareBlaster","") ControlClick("SpywareBlaster","","ThunderRT6Frame1") WinWait("SpywareBlaster","Form1") ControlClick("SpywareBlaster","Form1","ThunderRT6UserControlDC1") ControlClick("SpywareBlaster","Form1","ThunderRT6UserControlDC8") WinWait("SpywareBlaster","SideToolbar") ControlClick("SpywareBlaster","SideToolbar","ThunderRT6UserControlDC1") WinWait("SpywareBlaster","") ControlClick("SpywareBlaster","","ThunderRT6Frame1") #endregion --- End --- EndSwitch WEnd
-
okipokey, I checked thru the help file, but I'm a bit at a loss to find anything like a cmd emulator or at least how to word the commands so that they react with the same "arguments" I'd use in cmd. Is there a page I could look for with the right info? Is it simply the ShellExecute series of commands? (I havnt gotten around to reading thru the whole section on that yet --Edit Figured out that searching for "cmd" or "command" was basically useless in finding the info I needed looks like the Shell Execute commands are the meat and potatoes I'm after! Thanks a ton for pointing me that way
-
okipokey, the help file have me a better idea of the link between button and command, but now I've run into another issue. I want to use relative locations rather than absolute locations (i.e. ".\currentfolder\subfolder" versus "X:\currentfolder\subfolder") but I'm getting a syntax error on ".\" here's what I've got so far: WEnd$msg = $GUI_EVENT_CLOSE#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=c:\users\pyr0ball\dropbox\autoit\mainwindow.kxf $MainWindow = GUICreate("TNN AutoInstaller", 252, 230, 192, 124) $InstallStart = GUICtrlCreateButton("InstallStart", 64, 152, 115, 33) $Progress = GUICtrlCreateProgress(8, 200, 230, 17) $TNNLogo = GUICtrlCreatePic(".\SupportFiles\bluegreyLogo3.jpg", 10, 8, 228, 135) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $msg = $InstallStart Run('cmd ".\SupportFiles\spybot.bat" ') EndSwitch WEnd
-
I've never written code from scratch before, so a lot of the assumtions of existing knowledge in the tutorials are leaving me a bit stranded. Basically I've got a couple projects I want to do and both seem fairly simple, but I cant for the life of me find a comprehensive list of commands and modifiers or syntax to help me get it done. Here's what I want to do: 1. Build an auto installer script for a few programs, preferably with a basic GUI. Later I plan on implementing options for auto-update or other such contrivances, but a simple "Go" button is the goal for now. 2. Build an automatic scan script for several security tools I use on a regular basis. I've already built a couple of batch files that work with some of these program's built-in scripting so I'd like to use those batches as support files to avoid errors. I've already used Koda to build the basic GUI. My problem now is figuring out how to link the click of that "Go" button to launching a batch or macro. Halp?