Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

detected as virus


  • This topic is locked This topic is locked
8 replies to this topic

#1 zentral

zentral

    Seeker

  • Active Members
  • 38 posts

Posted 02 March 2010 - 02:23 PM

I wrote a really simple tool (noobie XD)and AntiVir marks it as a trojan.
Can u tell me why ? (maybe it's the shutdown function)
Any other suggestions welcome.

AutoIt         
;time saver v 2.0 by zentral Dim $delay =200 , $set=0 TrayTip("Time saver","Ready !"&@CRLF&"Please choose a time option." , 10, 1) Opt("TrayOnEventMode",1) Opt("TrayMenuMode",1) $1item = TrayCreateItem("15 min") TrayItemSetOnEvent(-1,"_15") $1item = TrayCreateItem("30 min") TrayItemSetOnEvent(-1,"_30") $2item = TrayCreateItem("60 min") TrayItemSetOnEvent(-1,"_60") $setitem = TrayCreateItem("Custom") TrayItemSetOnEvent(-1,"_custom") TrayCreateItem("") $aboutitem = TrayCreateItem("About") TrayItemSetOnEvent(-1,"_about") TrayCreateItem("") $exititem = TrayCreateItem("Exit") TrayItemSetOnEvent(-1,"ExitScript") TraySetState(4) while 1     if $set= 1 then         Sleep($delay)         _stop()     EndIf WEnd Func _15()     $delay = 900000     TrayTip("Time saver", "15 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)     TraySetState(8)     $set=1 EndFunc Func _30()     $delay = 1800000     TrayTip("Time saver", "30 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)     TraySetState(8)     $set=1 EndFunc Func _60()     $delay = 3600000     TrayTip("Time saver", "60 minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)     TraySetState(8)     $set=1 EndFunc Func _custom()     Do     $time= InputBox("Time saver","How much time ? (minutes)")     Until $time>0     $delay = $time*60000     TrayTip("Time saver",$time&" minutes"&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)     TraySetState(8)     $set=1 EndFunc func _stop()     Beep(500,500) $m=msgbox(276,"Time saver _ WARNING!","Time expired ... system shutdown"&@CRLF&"Are you doing something important?",300000) if $m=7 or $m=-1 then     msgbox(64,"Time saver","5 seconds to shutdown...",5)     shutdown(0)     Exit else     msgbox(64,"Time saver","You got 15 more min.")     sleep(900000)     Beep(500,500)     msgbox(16,"Time saver _ WARNING!","Time expired ... system shutdown",5)     shutdown(0)     Exit EndIf EndFunc Func _about()     TrayTip("Time saver", "by "&@CRLF&"Please visit AutoIt website.", 10, 1) EndFunc Func exitscript()     Exit EndFunc

forgive me for my crappy english.







#2 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,824 posts

Posted 02 March 2010 - 02:28 PM

zentral,

Please read the Sticky topic "Are my Autoit EXES really infected?" about 2 cms above yours! :mellow:

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#3 zentral

zentral

    Seeker

  • Active Members
  • 38 posts

Posted 02 March 2010 - 02:38 PM

zentral,

Please read the Sticky topic "Are my Autoit EXES really infected?" about 2 cms above yours! :mellow:

M23


Damn i wrote an useless post :( .
i'm really sry... Btw any suggestions about the script?

Edited by zentral, 02 March 2010 - 06:11 PM.

forgive me for my crappy english.

#4 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 19,824 posts

Posted 02 March 2010 - 02:53 PM

zentral,

Damn useless post

If you mean yours, I quite agree! :mellow:

As to your script, I would change it to allow for a "Cancel" button in the MsgBox and then only shut down if the user presses OK or the timeout occurs. Otherwise you are a bit stuck if you change your mind at the last second!

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#5 dani

dani

    Polymath

  • Active Members
  • PipPipPipPip
  • 215 posts

Posted 02 March 2010 - 03:04 PM

I would change the contents of your While 1 loop. With OnEventMode (or TrayOnEventMode), I only use a loop to keep the script running, but don't execute commands in it. Also, all the different functions are not required and imo not very pretty.

I would do it like:
AutoIt         
$1 = TrayCreateItem("15 min") TrayItemSetOnEvent(-1,"_setDelay") $2 = TrayCreateItem("30 min") TrayItemSetOnEvent(-1,"_setDelay") $3 = TrayCreateItem("60 min") TrayItemSetOnEvent(-1,"_setDelay") While True ; Forever     Sleep(100) ; Wait for events WEnd Func _setDelay()     Switch @GUI_CTRLID     Case $1 ; 15 min          $tip = 15          $delay = 900000     Case $2 ; 30 min          $tip = 30          $delay = 1800000     Case $3 ; 60 min          $tip = 60          $delay = 3600000     EndSwitch     TrayTip("Time saver", $tip & " minutes."&@CRLF&"Started at"&@HOUR&":"&@MIN&":"&@SEC, 10, 1)     TraySetState(8)     Sleep($delay)     _stop() EndFunc

Edited by dani, 02 March 2010 - 03:38 PM.


#6 MBALZESHARI

MBALZESHARI

    Member of the Hide & Seek world league

  • MVPs
  • 10,933 posts

Posted 02 March 2010 - 03:36 PM

Damn useless post.
i'm really sry... Btw any suggestions about the script?

Not useless. It answers your question.

#7 dani

dani

    Polymath

  • Active Members
  • PipPipPipPip
  • 215 posts

Posted 02 March 2010 - 03:45 PM

Not useless. It answers your question.

Clearly he means his own post, not M23's :mellow:

#8 zentral

zentral

    Seeker

  • Active Members
  • 38 posts

Posted 02 March 2010 - 06:07 PM

Yes, i mean my own post
Thanks you all.

p.s.: dani thx for your script. Obviously i have a lot to learn.

Edited by zentral, 02 March 2010 - 06:17 PM.

forgive me for my crappy english.

#9 Jos

Jos

    oh joy ...

  • Developers
  • 22,519 posts

Posted 02 March 2010 - 07:43 PM

Topic closed.
Start a new topic with valid title when you still have autoit3 questions

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users