Jump to content

Antispyware Program


 Share

Recommended Posts

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

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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

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

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

  • Moderators

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

  • Moderators

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 :lmao:

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
WEnd

MsgBox Way:

$iMsgBox = MsgBox(36, 'Run Program', 'Would you like to run the program?')
If $iMsgBox = 6 Then 
    Run('NOTEPAD.EXE')
Else
    Exit
EndIf

Edit2:

I was in a hurry to get my son to school... I corrected the GUI example.

Edited 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

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

EndSelect

WEnd

GUIDelete()

Exit

Link to comment
Share on other sites

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

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

I 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

  • Moderators

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...