PcExpert Posted January 10, 2006 Share Posted January 10, 2006 Hello, I'm creating a antispyware program that does everything automatically. But how can I program it that it starts the script, but when the scan is started it stops and when the results are showed it continues. Because the program I made just goes on, so when I woul'd like to let the program press a button to continue to the scan results it stops the scan, because the scan is in progress. So my question is: How can I let the program start, but when the scan is in progress it stops and when the scan is complete is goes on? Thanks, Link to comment Share on other sites More sharing options...
BigDod Posted January 10, 2006 Share Posted January 10, 2006 Hello,I'm creating a antispyware program that does everything automatically. But how can I program it that it starts the script, but when the scan is started it stops and when the results are showed it continues. Because the program I made just goes on, so when I woul'd like to let the program press a button to continue to the scan results it stops the scan, because the scan is in progress. So my question is: How can I let the program start, but when the scan is in progress it stops and when the scan is complete is goes on?Thanks,If you are using some external program you could start it using RunWait instead of Run. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
seandisanti Posted January 10, 2006 Share Posted January 10, 2006 Hello,I'm creating a antispyware program that does everything automatically. But how can I program it that it starts the script, but when the scan is started it stops and when the results are showed it continues. Because the program I made just goes on, so when I woul'd like to let the program press a button to continue to the scan results it stops the scan, because the scan is in progress. So my question is: How can I let the program start, but when the scan is in progress it stops and when the scan is complete is goes on?Thanks,there are a few execution controls you could use to pause or continue the process... check out winwait, winwaitactive, runwait, winexists Link to comment Share on other sites More sharing options...
PcExpert Posted January 10, 2006 Author Share Posted January 10, 2006 Ok thanks. I'm gonna try it out. Link to comment Share on other sites More sharing options...
PcExpert Posted January 10, 2006 Author Share Posted January 10, 2006 I tried one of them (WinWait), but it doesn't work. When I take a look to the window info of Ad-Aware SE Personal it displays no text. What's wrong? Link to comment Share on other sites More sharing options...
seandisanti Posted January 10, 2006 Share Posted January 10, 2006 I tried one of them (WinWait), but it doesn't work. When I take a look to the window info of Ad-Aware SE Personal it displays no text. What's wrong?not sure, it should show something... there are a few scripts that already interact with ad-aware, xpclean is one of them i believe, you could check out their source to see how they did it... Link to comment Share on other sites More sharing options...
PcExpert Posted January 10, 2006 Author Share Posted January 10, 2006 Thanks cameronsdad Link to comment Share on other sites More sharing options...
seandisanti Posted January 10, 2006 Share Posted January 10, 2006 Thanks cameronsdadNo problem, glad i could help Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 Is there a standard password to decompile exe to a script? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 11, 2006 Moderators Share Posted January 11, 2006 If you checked 'Allow Decompilation' without a password then you don't need a password, otherwise if you checked it and put a password you need the original password, or if you compiled it with it unchecked you won't be able to decompile it to script. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 what I meant was: There's a password on the file from XPCLEAN. So I can't see the source. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 11, 2006 Moderators Share Posted January 11, 2006 Could have searched for it Valauter has the au3 here too... http://www.autoitscript.com/forum/index.ph...1334&hl=xpclean Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 OK, thanks allot. My second question is: how can I make a button that starts a program? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 11, 2006 Moderators Share Posted January 11, 2006 (edited) Hmmm...Do you have a GUI? Do you have any code? There are several different ways to start a program... You could use an InputBox() / MsgBox() / GUI... and a few other greek words More specifics would be great EDIT:Here is a couple of examples:GUI Way:#include <guiconstants.au3> Dim $ItemIWantTrueToAct = 1 $MainGUI = GUICreate('MyGUI', 70, 30) $Button = GUICtrlCreateButton('Start', 10, 0, 50, 30) GUISetState() While 1 $MainMsg = GUIGetMsg() Select Case $MainMsg = $GUI_EVENT_CLOSE Exit Case $MainMsg = $Button If $ItemIWantTrueToAct = 1 Then Run('NOTEPAD.EXE') $ItemIWantTrueToAct = '' EndIf EndSelect WEndMsgBox Way:$iMsgBox = MsgBox(36, 'Run Program', 'Would you like to run the program?') If $iMsgBox = 6 Then Run('NOTEPAD.EXE') Else Exit EndIfEdit2:I was in a hurry to get my son to school... I corrected the GUI example. Edited January 11, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 Thanks, I'm using the menu tutorial as a base. This is the code from that tutorial:CODE:#include <GUIConstants.au3>GUICreate("GUI menu",300,200)$filemenu = GuiCtrlCreateMenu ("File")$fileitem = GuiCtrlCreateMenuitem ("Open...",$filemenu)$recentfilesmenu = GuiCtrlCreateMenu ("Recent Files",$filemenu)$separator1 = GuiCtrlCreateMenuitem ("",$filemenu)$exititem = GuiCtrlCreateMenuitem ("Exit",$filemenu)$helpmenu = GuiCtrlCreateMenu ("?")$aboutitem = GuiCtrlCreateMenuitem ("About",$helpmenu)$okbutton = GuiCtrlCreateButton ("OK",50,130,70,20)$cancelbutton = GuiCtrlCreateButton ("Cancel",180,130,70,20)GuiSetState()While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbutton ExitLoop Case $msg = $fileitem $file = FileOpenDialog("Choose file...",@TempDir,"All (*.*)") If @error <> 1 Then GuiCtrlCreateMenuItem ($file,$recentfilesmenu) Case $msg = $exititem ExitLoop Case $msg = $okbutton MsgBox(0, "Click","You clicked OK!") Case $msg = $aboutitem Msgbox(0,"About","GUI Menu Test") EndSelectWEndGUIDelete()Exit Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 By the way, in the code from XPCLEAN I haven't been able to find a code to automate Ad-Aware SE. When I was running the program I saw that it wasn't automated. So, coul'd you please help me with finding a way to let Ad-Aware configure itself, then run the scan, take a break and then go on. By the way, Thanks for all the time you took to explain this to me Link to comment Share on other sites More sharing options...
BigDod Posted January 11, 2006 Share Posted January 11, 2006 By the way, in the code from XPCLEAN I haven't been able to find a code to automate Ad-Aware SE. When I was running the program I saw that it wasn't automated. So, coul'd you please help me with finding a way to let Ad-Aware configure itself, then run the scan, take a break and then go on.By the way,Thanks for all the time you took to explain this to meI am not sure how to do it with ad-aware as I think it does not use standard controls but Here is one that I found that uses Spybot - Search and Destroy. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 OK, thanks. Can you discover a line where a command stands? Like: MouseClick("left", 366, 492, 1) Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 11, 2006 Moderators Share Posted January 11, 2006 Opt('TryIconDebug', 1) at the top of your script, then hover your mouse over the icon in the system tray. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
PcExpert Posted January 11, 2006 Author Share Posted January 11, 2006 To be clear I have a attachment with this post. On the image you see Ad-Aware ready to start the scan process. My program clicks this button. But goes on while scanning the system. So it cancels the scan. But is there a way to let the program take a break and when the text "Scan Complete"appears it continues (click the next button) Link to comment Share on other sites More sharing options...
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