Jump to content

stingjoel

Active Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by stingjoel

  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
  16. My Scripts have 3 GUI....1 GUI without List/Combo Control, 1 GUI with 7 Combo Control and 1 GUI with one List Control.... When I run it (before I install the 2nd last unstable autoit), I can show every GUI...but after I install the 2nd last unstable autoit (sorry, not the last one), The GUI can't show like usual....when I debug it one by one, the problem is in Combo/List control...the control need time too long to create...so, the GUI can't show like usual (some of control at GUI #2 show in GUI #1).... Sorry for my bad english....I hope u understand my explanation...
  17. Jon, I think I found a bug at GUICtrlCreateList & GUICtrlCreateCombo...it need long time to create it....please check....my scripts act different after I download last unstable.... :">
  18. Oh yess....I am an . why I don't realize this... :) :">
  19. Larry, I see this code above in your scripts....can you explain the code....In my experience, the function will always have return value 1....or maybe this code is the same with this: If $err Then Return 0 Else Return 1 EndIf There is no documentation about If...Then statement like your code
  20. Your script is great and simple if you have only 1 CDROM...if you have 100 CDROMs (yeah...yeah I know it is imposible ), how long will your script be? Btw, I think....it is not necessary placing Hotkeyset in while WEnd loop... Sorry for my bad english
  21. Thanks to ezzetabi...with function _IsPressed, you can open or close all CDROM you have by clicking hotkeys... If you have 2 CDROM, just press: - WIN+O then 1 to open 1st CDROM, press WIN+C then 1 to close it - WIN+O then 2 to open 2nd CDROM, press WIN+C then 2 to close it... If you have 9 CDROM and you want to open 5th CDROM, just press WIN+O then 5....press WIN+C then 5 to close it... This script is limited to 9 CDROMs (I'll be amaze if you have 9 CDROM on your computer ) but if you have more than 9 CDROMS, you can modify it for you requirement... ; ---------------------------------------------------------------------------- ; Include ; ---------------------------------------------------------------------------- #include <_IfPressed.au3> ; ---------------------------------------------------------------------------- ; HotKeySet ; ---------------------------------------------------------------------------- Hotkeyset("#o", "OpenCDTray") Hotkeyset("#c", "CloseCDTray") HotKeySet("#!{ESC}", "Quit") ; ---------------------------------------------------------------------------- ; Initialize ; ---------------------------------------------------------------------------- Global $FlagCDTray = "False", $CountCDTray = 0, $StatusCDTray ; ---------------------------------------------------------------------------- ; Looping Process ; ---------------------------------------------------------------------------- While 1 If $FlagCDTray = "True" Then $CountCDTray = $CountCDTray + 1 For $X = 31 to 39 If _IsPressed(String($X)) Then $FlagCDTray = "False" $CountCDTray = 0 OpenCloseCDTray($X - 30) ExitLoop EndIf Next If ($CountCDTray >= 10) Then $FlagCDTray = "False" $CountCDTray = 0 EndIf Endif Sleep(100) WEnd ; ---------------------------------------------------------------------------- ; Function OpenCDTray ; ---------------------------------------------------------------------------- Func OpenCDTray() $FlagCDTray = "True" $StatusCDTray = "Open" EndFunc ; ---------------------------------------------------------------------------- ; Function CloseCDTray ; ---------------------------------------------------------------------------- Func CloseCDTray() $FlagCDTray = "True" $StatusCDTray = "Close" EndFunc ; ---------------------------------------------------------------------------- ; Function OpenCloseCDTray ; ---------------------------------------------------------------------------- Func OpenCloseCDTray($Number) ;MsgBox(64, "", $Number) $CDROM = DriveGetDrive("CDROM") If NOT @error Then If ($Number <= $CDROM[0]) then If $StatusCDTray = "Close" Then CDTray($CDROM[$Number], "closed") Else CDTray($CDROM[$Number], "open") EndIf EndIf EndIf EndFunc ; ---------------------------------------------------------------------------- ; Function Quit ; ---------------------------------------------------------------------------- Func Quit() $Result = MsgBox(308, "Warning", "This Utility will be terminated" & @CRLF & " A r e y o u s u r e ?") If $Result = 6 Then Exit EndIf EndFunc
  22. Yes...you read my mind...are you a psychician? I want to make SMS (Short Messaging System) application using AutoIt OK, I'll follow your link....thanks a lot...
  23. I think local computer with username: "username" must join domain to the server...so when you do RunAsSet, user at local computer will be changed into "username" and it will also connect to the server...so you can run application at server (if you have rights).. Sorry if you don't undertand my bad english.... :">
  24. Hi all, Can I connect to COM serial port and communicate? maybe from runDLL? can I have the DLL documentation or anything? Big...big...thanks....
  25. YESSSSS...you are right Sorry, I am replying when you reply
×
×
  • Create New...