Jump to content

star2

Active Members
  • Posts

    456
  • Joined

  • Last visited

Everything posted by star2

  1. interested in Source Scripts only.
  2. I compiled your script and it's OK is this the whole script? or as MsCreatoR said are you running another script that runs this one?
  3. you're welcome at this point your best friend is the Autoit Help file and the Autoit Forum Search search them a lot and you'll get valuable info.
  4. If FileExists ("c:\windows") = 1 Then MsgBox (-1, "test", "Dir Exists !!!") ElseIf FileExists ("c:\windows") = 0 Then MsgBox (-1, "test", "Dir Does not Exist !!!") EndIf from the help file:
  5. how can I use this with tray menus? ----------- Edit : sorry never mind found it in the help file !!
  6. well Smashly already provided you with the example ! from smashly script: Case $Tray4 ShellExecute("explorer.exe", "/e," & @SystemDir)
  7. this is the function form as you know WinMove ( "title", "text", x, y [, width [, height[, speed]]])oÝ÷ ÚÊ"*.¦ëmì"Ú0ªê-¶+ez«¨µÊ+­ç-,¨¹Æ§æ¯zØ^Â)Ý£ ®¢Û^²Ú®¢×¦¦Ü¬¢lvøzÚ2¢è¬¶h¹¹^rØ^Â)Ý£b¶WºÚ"µÍÚ[[ÝH ][ÝÔÚÜÝ]É][ÝË ][ÝÉ][ÝËL Î for the window title you can use the AutoIt Window Info tool
  8. http://msdn2.microsoft.com/en-us/default.aspx and try this program http://www.nirsoft.net/utils/dll_export_viewer.html
  9. RegRead (your registry key here) If @error Then action -1 (here you put what happens when the key is missing) Else action - 2 (here you put what happens when the key is available) EndIf
  10. just like BigDod said check the example: #include <GUIConstants.au3> Opt('TrayMenuMode', 1) $main = GUICreate("Test", 200, 80) $go = GUICtrlCreateButton ("Minimize to Tray", 10, 10, 150,25) $exit = GUICtrlCreateButton ("exit", 10, 40, 150,25) $tray_hide = TrayCreateItem ("Hide Gui") TrayCreateItem ("") $tray_Restore = TrayCreateItem ("Restore Gui") TrayCreateItem ("") $tray_exit = TrayCreateItem ("Exit") TrayItemSetState ($tray_Restore,$gui_disable) GUISetState () While 1 $msg = GUIGetMsg() $msgt = TrayGetMsg() _hide() _show() _exit() Wend Func _hide() If $msg = $go Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $main, "int", 100, "long", 0x00090000);fade-out TrayItemSetState ($tray_Restore,$gui_enable) TrayItemSetState ($tray_hide,$gui_disable) EndIf If $msgt = $tray_hide Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $main, "int", 100, "long", 0x00090000);fade-out TrayItemSetState ($tray_Restore,$gui_enable) TrayItemSetState ($tray_hide,$gui_disable) EndIf EndFunc Func _show() If $msgt = $tray_Restore Then TrayItemSetState ($tray_Restore,$gui_disable) TrayItemSetState ($tray_hide,$gui_enable) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Main, "int", 200, "long", 0x00080000);fade-in EndIf EndFunc Func _exit() If $msg = $exit Or $msg = $gui_event_close Or $msgt = $tray_exit Then DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Main, "int", 500, "long", 0x00050010);implode Exit EndIf EndFunc
  11. check this example from the (==> Welcome to AutoIt 1-2-3 <== A ) lessons the post is by our Valuater ;Animate Display *nice* addition ; Author Raindancer $hwnd = GUICreate("Animate Window", 300, 200) GUICtrlCreateLabel("Fantasic... You Have PASSED!!!", 50, 50, 200, 50) GUICtrlSetFont( -1, 16, 800) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00080000);fade-in GUISetState() DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00090000);fade-out DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040001);slide in from left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050002);slide out to left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040002);slide in from right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050001);slide out to right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040004);slide-in from top DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050008);slide-out to top DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040008);slide-in from bottom DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050004);slide-out to bottom DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040005);diag slide-in from Top-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0005000a);diag slide-out to Top-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040006);diag slide-in from Top-Right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050009);diag slide-out to Top-Right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040009);diag slide-in from Bottom-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050006);diag slide-out to Bottom-left DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x0004000a);diag slide-in from Bottom-right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050005);diag slide-out to Bottom-right DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00040010);explode Sleep(1000) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 1000, "long", 0x00050010);implode #define AW_HOR_POSITIVE 0x00000001 #define AW_HOR_NEGATIVE 0x00000002 #define AW_VER_POSITIVE 0x00000004 #define AW_VER_NEGATIVE 0x00000008 #define AW_CENTER 0x00000010 #define AW_HIDE 0x00010000 #define AW_ACTIVATE 0x00020000 #define AW_SLIDE 0x00040000 #define AW_BLEND 0x00080000 this helped me a lot in making simple window animation
  12. see the help file for GUISetBkColor #include <GuiConstants.au3> $Main = GUICreate ("test", 200,150,-1,-1,$WS_POPUP+$WS_THICKFRAME) GUISetBkColor (0x80FFFF) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd
  13. don't worry, you'll manage to understand how the various of scripts work !! it will take time (I'm still learning and I'm loving it) as for the topic I linked to you try to read the topic itself cause the author of the script did explain about it and you can read the other replies and try to ask questions even there about how to use the script !!
  14. Check this out ! my advice search the forum before asking !!
  15. Just like the master told you use While-Wend example: HotKeySet ("{F1}", "_exit") ; this is a hotkey to help you execute a function While 1 ; this will make your script loops MsgBox (-1, "test" , "test", 1) WEnd Func _exit() ; simple function to exit the script Exit EndFunc
  16. well I wouldn't post a lot of replies like what you're doing here !! that will not make the Mods happy ! u can edit your last reply if u want to !!
  17. thanks again, so in fact, there is a problem with existing GuiCreateCheckBox ! or the problem as I said befor in the GuiTabControl !
  18. may I bother you with a little explaination? thanks it works fine.
  19. well, the problem is that the BkColor of the CheckBox can not be redrawn immediately after using the animation I've attached a snap-shot of the GUI after lunching, here is an example Script: #include <GUICONSTANTS.AU3> $Gui1 = GUICreate ("test", 250,200 ) GUISetBkColor (0x000000) GUICtrlCreateTab (5,5,240,160) GUICtrlCreateTabItem ("Test - 1") GUICtrlCreateCheckbox ("test test test test test" , 10 , 40, 200,25) GUICtrlCreateCheckbox ("test test test test test" , 10 , 70, 200,25) GUICtrlCreateLabel ("test test test test test" , 10 , 100, 200,25) GUICtrlCreateTabItem("") $apply_1 = GUICtrlCreateButton ("Test",5,170,240,25) DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $Gui1, "int", 500, "long", 0x00040004);slide in from right GUISetState () While 1 $msg = GUIGetMsg () If $msg = $gui_event_close Then ExitLoop WEnd any Ideas? I've noticed that if I call the Dll Animation before creating the Gui Controls everything will work fine except for the GuiBkColor any way I'm calling the Dll Animation Function more that once in my script so I need to figure a way to redraw the GuiControls or a way for correcting the BkColor of the Controls. by the way the problem has something to do with the GuiTabControl !! as it is the pain in the a** with colorings !!
  20. as we put the conditional action (for the warning box) in the loop it will continue doing it's job for ever, as for exiting and starting with another operation, you don't have to do that just start the next operation after the last step of the previous is done so let's say you saved your snapshot, this is when you can add the next operation. by the way there is some useful functions for capturing screen shots instead of using what you did: Send("{PRINTSCREEN}") ControlClick("PassMark Rating (PerformanceTest 6.1)", "&OK", 1) Send("!{F4}") Run("C:\Windows\System32\mspaint.exe") WinWait("Untitled - Paint") WinActivate("Untitled - Paint") Send("^v") Sleep(1000) Send("^s") WinWait("Save As") WinActivate("Save As")oÝ÷ Û*.q©î±ëaȧ²×u«­¢+Ø%¹±Õ±ÐíMɹ ÁÑÕɹÔÌÐì)}Mɹ ÁÑÕÉ} ÁÑÕÉ¡lÀÌØíÍ¥±9µôÅÕ½ÐìÅÕ½Ðíl°ÀÌØí¥1ÐôÁl°ÀÌØí¥Q½ÀôÁl°ÀÌØí¥I¥¡Ðô´Ål°ÀÌØí¥ ½Ñѽ´ô´Ål°ÀÌØí ÕÉͽÈôQÉÕuuuuutoÝ÷ ÙìZ^~º&¶¡zZ_WºÚ"µÍÚ[ÛYH ÔØÜY[ØK]LÉÝÂÈØH[ØÜY[ÔØÜY[ØWÐØJ^QØÝ[Y[Ñ [È ][ÝÉÌLÑÑT×Ò[XYÙLKÉ][ÝÊBÈØHYÚ[ÛÔØÜY[ØWÐØJ^QØÝ[Y[Ñ [È ][ÝÉÌLÑÑT×Ò[XYÙLÉ][ÝË ÎM NM Just search the help file for: _ScreenCapture_Capture Good luck
  21. Run("C:\Program Files\PerformanceTest\pt.exe") While 1 If WinExists ("WARNING") Then WinActivate("WARNING") ControlClick("WARNING" , "Cancel", 2 , "left" , 1 , 50 , 10) EndIf If WinExists("PassMark(TM) PerformanceTest") = 1 Then WinActivate("PassMark(TM) PerformanceTest") ControlClick("PassMark(TM) PerformanceTest", "&Continue", 1035) EndIf If WinExists("PerformanceTest 6.1 Evaluation Version") =1 Then WinActivate("PerformanceTest 6.1 Evaluation Version") Sleep(2000) ControlClick("PerformanceTest 6.1 Evaluation Version" , "" , 1 , "left" , 1 , 370 , 20) EndIf If WinExists("PassMark Rating (PerformanceTest 6.1)")=1 Then WinActivate("PassMark Rating (PerformanceTest 6.1)") Send("{PRINTSCREEN}") ControlClick("PassMark Rating (PerformanceTest 6.1)", "&OK", 1) Send("!{F4}") Run("C:\Windows\System32\mspaint.exe") WinWait("Untitled - Paint") WinActivate("Untitled - Paint") Send("^v") Sleep(1000) Send("^s") WinWait("Save As") WinActivate("Save As") EndIf WEnd you need to decide when to exit your script cause this way it will continue looping
  22. just put the conditional action in the loop like this while 1 if WinExists ("title","text") then ControlClick ("title","text", ControlID, button, clicks) endif wend
  23. so where's the script you wrote?
  24. Check this
×
×
  • Create New...