Jump to content

stingjoel

Active Members
  • Posts

    35
  • Joined

  • Last visited

stingjoel's Achievements

Seeker

Seeker (1/7)

1

Reputation

  1. Opppsss....sorry... I see you use @computername for domain...I think the parameter is for domain server, not computer name....
  2. This is from Autoit help file: Remarks This function allows subsequent Run and RunWait functions to run as a different user (e.g. Administrator). The function only works on the 2000/XP (or later) platforms. NT4 users should install and use the SU command from the NT Resource Kit. The "Secondary Logon service" or "RunAs service" must not be disabled if you want this function to work.
  3. Sliding Menu like windows taskbar...this script just basic script... Change $SlidingWidth value if you want larger menu... Change $MouseDelay value if you want shorter/longer delay to show the menu... #Include <GUIConstants.au3> AutoItSetOption("GuiOnEventMode", 1) AutoItSetOption("TrayIconHide", 1) Global $GUIWinSliding $SlidingWidth = 50 $MouseDelay = 50 $SlidingPos = -($SlidingWidth + 2) $MouseCounter = 0 $MouseLeftCounter = 0 $FlagSliding = 0 $GUIWinSliding = GUICreate("BSMUSliding", $SlidingWidth, @DesktopHeight, $SlidingPos, 0, $WS_POPUPWINDOW, $WS_EX_TOPMOST) GUISetState(@SW_SHOW) HotKeySet("{PAUSE}", "Quit") While 1 $MousePosition = MouseGetPos() If $MousePosition[0] = 0 Then $MouseLeftCounter = 0 $MouseCounter = $MouseCounter + 1 Else If $FlagSliding Then If $MousePosition[0] >= $SlidingWidth Then $Mousecounter = 0 $MouseLeftCounter = $MouseLeftCounter + 1 EndIf EndIf EndIf If $MouseCounter = $MouseDelay Then $MouseCounter = 0 $MouseLeftCounter = 0 If $FlagSliding = 0 Then For $X = $SlidingPos To 0 step 2 WinMove("BSMUSliding", "", $X, 0) Next $FlagSliding = 1 EndIf EndIf If $MouseLeftCounter = $MouseDelay Then $MouseLeftCounter = 0 $MouseCounter = 0 If $FlagSliding = 1 Then For $X = 0 To $SlidingPos Step -2 WinMove("BSMUSliding", "", $X, 0) Next $FlagSliding = 0 EndIf EndIf Sleep(10) WEnd Func Quit() Exit EndFunc
  4. How about function parameter at HotKeySet, GuiSetOnEvent and GuiCtrlSetOnEvent :">
  5. Did you download the latest unstable autoit? If not, try download the lastest, because it run good in my computer... :"> Or have you copy and paste all the script? because I add Opt("GuiOnEventMode", 1)...without this statement/function, GuiSetOnEvent will result an error
  6. Marek, I am trying to rebuilt your script...I hope this script is like what you want...but I remove test window... #include <GUIConstants.au3> Opt("GuiOnEventMode", 1) Global $quickdown, $logoff, $shutdown, $reboot, $powerdown, $suspend, $hibernate $quickdown = GUICreate("QuickDown - version 1.1", 400, 250) GuiSetOnEvent($GUI_EVENT_CLOSE, "Quit") $heading = GUICtrlCreateLabel("QuickDown v1.1",128.5,-1,143,25) ;l-r = window length/2 - label length/2 GUICtrlSetFont($heading, 15) $hotkeylabel = GUICtrlCreateLabel("Hot keys available:", 20,50,140,20) GUICtrlSetFont($hotkeylabel, 10) $logoff = GUICtrlCreateCheckbox("Logoff", 20,75,80,20) $shutdown = GUICtrlCreateCheckbox("Shut down", 20,95,80,20) $reboot = GUICtrlCreateCheckbox("Reboot", 20,115,80,20) $powerdown = GUICtrlCreateCheckbox("Power down", 20,135,80,20) $suspend = GUICtrlCreateCheckbox("Suspend", 20,155,80,20) $hibernate = GUICtrlCreateCheckbox("Hibernate", 20,175,80,20) GUICtrlCreatelabel("alt + l", 105,78,60,20) GUICtrlCreateLabel("alt + t", 105,98,60,20) GUICtrlCreateLabel("alt + r", 105,118,60,20) GUICtrlCreateLabel("alt + p", 105,138,60,20) GUICtrlCreateLabel("alt + s", 105,158,60,20) GUICtrlCreateLabel("alt + h", 105,178,60,20) $select = GUICtrlCreateButton("Select Hot Keys", 250,75,100,20) $reset = GUICtrlCreateButton("Reset Hot Keys", 250,105,100,20) $start = GUICtrlCreateButton("Start", 250,135,100,20) GuiCtrlSetOnEvent(-1, "StartButton") $cancel = GUICtrlCreateButton("Cancel", 250,165,100,20) GUISwitch($quickdown) GUISetState(@SW_SHOW) HotKeySet("^o", "REOPEN") While 1 Sleep(100) WEnd Func REOPEN() GUISwitch($quickdown) GUISetState(@SW_SHOW) EndFunc Func Logoff() MsgBox (4096, "Logoff", "Logoff") ;Shutdown(4) EndFunc Func Terminate() MsgBox (4096, "ShutDown", "ShutDown") ;Shutdown (13) EndFunc Func Reboot() MsgBox (4096, "Reboot", "Reboot") ;Shutdown(6) EndFunc Func Powerdown() MsgBox (4096, "Power Down", "Power Down") ;Shutdown(12) EndFunc Func Suspend() MsgBox (4096, "Suspend", "Suspend") ;Shutdown(36) EndFunc Func Hibernate() MsgBox (4096, "Hibernate", "Hibernate") ;Shutdown (68) EndFunc Func StartButton() GUISwitch($quickdown) GUISetState(@SW_HIDE) HotKeySet("!l") HotKeySet("!t") HotKeySet("!r") HotKeySet("!p") HotKeySet("!s") HotKeySet("!h") If GUIRead($logoff)=1 Then HotKeySet("!l", "Logoff") If GUIRead($shutdown)=1 Then HotKeySet("!t", "Terminate") If GUIRead($Reboot)=1 Then HotKeySet("!r", "Reboot") If GUIRead($powerdown)=1 Then HotKeySet("!p", "Powerdown") If GUIRead($suspend)=1 Then HotKeySet("!s", "Suspend") If GUIRead($hibernate)=1 Then HotKeySet("!h", "Hibernate") EndFunc Func Quit() Exit EndFunc
  7. Chris_1013, That task is already done at BSMU(BSMultipurposeUtility)....just like what you write below....try it... If the shutdown countdown pop up show and you don't want to shutdown, just click WIN+ALT+c then disable shutdown....your computer will not shutdown... I'll add some feature at BSMU...not only shutdown, but also suspend, hibernate, force shutdown, lock computer etc. (I have some great idea [IMHO ] that will implement in BSMU)...
  8. Click button: WIN+ALT+F1....it will open a window with all shortcut button list to use... Have you read about.txt?
  9. Carlos...You can decompile it...but I forgot...I already check allow decompilation or not... :">
  10. Thanks for your support ezzetabi...I like your Run! too... :"> I also use your _IsPressed function...
  11. Here is...
  12. Try this: ControlSetText ("about:blank - Microsoft Internet Explorer", "", "Edit1", @ScriptDir & "/test.html") ControlClick ("about:blank - Microsoft Internet Explorer", "", "ToolbarWindow322") ;Press Go Button Change windows title text parameter with yours...
  13. Please download and give comment to my first autoit app : BSMU Thanks a lot... :">
  14. Try this... $WinTitle = WinGetTitle("") If StringUpper($WinTitle) = "NOTEPAD" Then MsgBox(0, "", "Notepad window..." & @CRLF & "Click OK to close it!") WinClose($WinTitle, "") EndIf
  15. Change it into upper case or lower case, then check it... If StringUpper(WinGetTitle("")) = "NOTEPAD" Then MsgBox(0, "", "Notepad Window") EndIf or If StringLower(WinGetTitle("")) = "notepad" Then MsgBox(0, "", "Notepad Window") EndIf
×
×
  • Create New...