Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/07/2015 in all areas

  1. Hi! Today I want to show you my current AutoIt project: The ISN AutoIt Studio. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system, trophies and a lot more features!! Here are some screenshots: Here some higlights: -> easy to create/manage/public your AutoIt-projects! ->integrated GUI-Editor (ISN Form Studio 2) ->integrated - file & projectmanager ->auto backupfunction for your Projects ->extendable with plugins! ->available in several languages ->trophies ->Syntax highlighting /Autocomplete / Intelisense ->Dynamic Script ->detailed overview of the project (total working hours, total size...) And much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: http://autoit.de/index.php?page=Thread&threadID=29742&pageNo=1 For more information visit my Homepage: https://www.isnetwork.at So….have fun with ISN AutoIt Studio! PS: Sorry for my bad English! ^^
    1 point
  2. You can just to that : Else $TimeToSpend = $TimeLeft $Timer = TimerInit() $Pause = 0 EndIf
    1 point
  3. esullivan

    Shutdown Script

    Final code that works perfect! Thanks guys! #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <SendMessage.au3> #include <Date.au3> #AutoIt3Wrapper_icon=Shutdown.ico Opt("TrayMenuMode", 1) Func Postpone() Sleep(1000 * 1 * 60 * 30) AskForShutdown() EndFunc AskForShutdown() Func AskForShutdown() $iDuration = 60 ;Countdown Timer in Seconds $sTitle = "ASD Countdown Timer" $sMessage = "This computer will shutdown " & @CRLF & "when this countdown completes." $sButton1 = "Do it now" $sButton2 = "Postpone" $iReturn = _CountdownGUI($iDuration, $sTitle, $sMessage, $sButton1, $sButton2) If $iReturn = 1 Then Shutdown(BitOR($SD_SHUTDOWN, $SD_POWERDOWN)) Elseif $iReturn = 2 Then Postpone() Else Shutdown(BitOR($SD_SHUTDOWN, $SD_POWERDOWN)) EndIf EndFunc Func _CountdownGUI($iDuration = 60, $sTitle = "Countdown Timer", $sMessage = "", $sButton1 = "Yes", $sButton2 = "No", $dTitleBKColor = "0x0F4400", $dTitleTextColor = "0xFFFFFF") ;Create GUI Window Local $hGUI = GUICreate($sTitle, 350, 230, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST) ;Title Window Portion GUICtrlSetDefBkColor($dTitleBKColor) GUICtrlCreateLabel("",0,0,350,10) GUICtrlCreateLabel($sTitle, 0, 10, 350, 30, $SS_CENTER) GUICtrlSetColor(-1, $dTitleTextColor) GUICtrlSetFont(-1, 12, 700) GUICtrlSetDefBkColor("0xF0F0F0") ;Message Area GUICtrlCreateLabel("",0,40,350,20) GUICtrlCreateLabel($sMessage, 0, 60, 350, 70, $SS_CENTER) GUICtrlSetFont(-1, 10, 700) ;Timer Area GUISetFont(12, 700) Local $idTimer = GUICtrlCreateLabel("00:00:00", 0, 130, 350, 30, $SS_CENTER) ;Buttons GUISetFont(10, 0) Local $idButton1 = GUICtrlCreateButton($sButton1, 50, 180, 100, 30) Local $idButton2 = GUICtrlCreateButton($sButton2, 202, 180, 100, 30) ;Function Return Variable Local $iReturn = 0 ;Display Countdown GUI GUISetState(@SW_SHOW) ;Setup Countdown Time Variable $iCountdown = $iDuration ;Setup Countdown Update Timer and Set Countdown Local $hRefreshTimer = TimerInit() GUICtrlSetData($idTimer, _CountDownCalc($iCountdown)) $iCountdown -= 1 ;GUI Loop While Not $iReturn ;GUI Countdown Update If TimerDiff($hRefreshTimer) >= 999 Then $hRefreshTimer = TimerInit() GUICtrlSetData($idTimer, _CountDownCalc($iCountdown)) $iCountdown -= 1 If $iCountdown < 0 Then ExitLoop EndIf ;GUI Events $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $idButton1 $iReturn = 1 Case $idButton2 $iReturn = 2 EndSwitch WEnd ;Kill GUI GUIDelete($hGUI) Return $iReturn EndFunc Func _CountDownCalc($iCountdown) ;Special thanks to careca - http://www.autoitscript.com/forum/topic/162789-timer-with-000/?p=1184285 $iHour = Int($iCountdown / 3600) $iMin = Int(($iCountdown - $iHour * 3600) / 60) $iSec = $iCountdown - $iHour * 3600 - $iMin * 60 Return StringFormat('%02d:%02d:%02d', $iHour, $iMin, $iSec) EndFunc
    1 point
  4. TheDcoder

    Shutdown Script

    Happy to help
    1 point
  5. esullivan

    Shutdown Script

    Think I got it! Testing now.
    1 point
  6. TheSaint

    History in InputBox

    As you are using an Input in a GUI, are you aware, that you could also use a Combo instead, which you could populate with previous entries? Often with a Combo, when you begin typing, certain entries will come to the fore when you click the down icon. Based on alphabetical from left. This could possibly be a suitable solution for you? (it gives a browse for right solution option as well) P.S. Obviously MikahS has given you great help/solution already, but I offer an alternative you or others might not have thought of.
    1 point
  7. Thanks, Zalomalo. All good advice. Your English is 100% better than any other language I'd try to speak.
    1 point
  8. spudw2k

    Shutdown Script

    If it were me I'd make a countdown that is presented to the user, give them the option to postpone, act now or do nothing. Here's a simple countdown GUI. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> #include <SendMessage.au3> #include <Date.au3> Opt("TrayMenuMode", 1) $iDuration = 60 ;Countdown Timer in Seconds $sTitle = "Countdown Timer" $sMessage = "Something is going to happen " & @CRLF & "when this countdown completes." $sButton1 = "Do it now" $sButton2 = "Postpone" $iReturn = _CountdownGUI($iDuration, $sTitle, $sMessage, $sButton1, $sButton2) If $iReturn Then MsgBox(0,"","Button " & $iReturn & " Clicked") Else Msgbox(0,"","No action taken" & @CRLF & "Timer Expired") EndIf Func _CountdownGUI($iDuration = 60, $sTitle = "Countdown Timer", $sMessage = "", $sButton1 = "Yes", $sButton2 = "No", $dTitleBKColor = "0x3399FF", $dTitleTextColor = "0xFFFFFF") ;Create GUI Window Local $hGUI = GUICreate($sTitle, 350, 230, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST) ;Title Window Portion GUICtrlSetDefBkColor($dTitleBKColor) GUICtrlCreateLabel("",0,0,350,10) GUICtrlCreateLabel($sTitle, 0, 10, 350, 30, $SS_CENTER) GUICtrlSetColor(-1, $dTitleTextColor) GUICtrlSetFont(-1, 12, 700) GUICtrlSetDefBkColor("0xF0F0F0") ;Message Area GUICtrlCreateLabel("",0,40,350,20) GUICtrlCreateLabel($sMessage, 0, 60, 350, 70, $SS_CENTER) GUICtrlSetFont(-1, 10, 700) ;Timer Area GUISetFont(12, 700) Local $idTimer = GUICtrlCreateLabel("00:00:00", 0, 130, 350, 30, $SS_CENTER) ;Buttons GUISetFont(10, 0) Local $idButton1 = GUICtrlCreateButton($sButton1, 50, 180, 100, 30) Local $idButton2 = GUICtrlCreateButton($sButton2, 202, 180, 100, 30) ;Function Return Variable Local $iReturn = 0 ;Display Countdown GUI GUISetState(@SW_SHOW) ;Setup Countdown Time Variable $iCountdown = $iDuration ;Setup Countdown Update Timer and Set Countdown Local $hRefreshTimer = TimerInit() GUICtrlSetData($idTimer, _CountDownCalc($iCountdown)) $iCountdown -= 1 ;GUI Loop While Not $iReturn ;GUI Countdown Update If TimerDiff($hRefreshTimer) >= 999 Then $hRefreshTimer = TimerInit() GUICtrlSetData($idTimer, _CountDownCalc($iCountdown)) $iCountdown -= 1 If $iCountdown < 0 Then ExitLoop EndIf ;GUI Events $aMsg = GUIGetMsg(1) Switch $aMsg[0] Case $idButton1 $iReturn = 1 Case $idButton2 $iReturn = 2 EndSwitch WEnd ;Kill GUI GUIDelete($hGUI) Return $iReturn EndFunc Func _CountDownCalc($iCountdown) ;Special thanks to careca - http://www.autoitscript.com/forum/topic/162789-timer-with-000/?p=1184285 $iHour = Int($iCountdown / 3600) $iMin = Int(($iCountdown - $iHour * 3600) / 60) $iSec = $iCountdown - $iHour * 3600 - $iMin * 60 Return StringFormat('%02d:%02d:%02d', $iHour, $iMin, $iSec) EndFunc
    1 point
  9. And thank you, Zalomalo, for these tips about Vars and single and double quotes. I have much to learn about AutoIt, but it's fun.
    1 point
  10. Jos

    Bots

    Think this was made clear already and would appreciate when you know when to simply shut up and not to butt in! Jos
    1 point
  11. TheDcoder

    Shutdown Script

    While 1 Sleep(1000 * 1 * 60 * 30) AskForShutdown() WEnd Func AskForShutdown() $answer = MsgBox(4 + 48, "Shutdown?", "Do you wanna postphone the shutdown?", 1 * 60 * 3) If $answer = 7 Then Shutdown(BitOR($SD_SHUTDOWN, $SD_POWERDOWN)) ElseIf $answer = -1 Shutdown(BitOR($SD_SHUTDOWN, $SD_POWERDOWN)) EndIf EndFunc TD
    1 point
  12. You have to use _WinAPI_CopyImage _ClipBoard_SetDataEx to put a GDI image to the clipboard. Not tested example $hHBitmap = _ScreenCapture_CaptureWnd ("", $g_SnapShotWindow, 0 , 0, -1, -1, False ) $hClipboard_Bitmap = _WinAPI_CopyImage($hHBitmap, 0, 0, 0, BitOR($LR_COPYDELETEORG, $LR_COPYRETURNORG)) _WinAPI_DeleteObject($hHBitmap) _ClipBoard_Open(0) $hCP = _ClipBoard_SetDataEx($hClipboard_Bitmap, $CF_BITMAP) _ClipBoard_Close()
    1 point
  13. someday i'll make it to the level i'll feel ashamed for not thinking about it myself... a simple and elegant workaround! thanks Yashid!
    1 point
×
×
  • Create New...