Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/04/2013 in all areas

  1. Hot-tracking in a menu bar means that the (drop down) menu items are shown automatically, when the mouse cursor hovers over the top menu item, without the need to click it. This is the case for an ordinary menu, but not for a toolbar menu. To implement that functionality for a toolbar menu, you have to code it yourself. These examples implements that functionality. The toolbar menu can be custom drawn, to look like an ordinary menu. You have to click a top menu item once, to open the first drop down menu. The toolbar can contain other controls in addition to the menu. And it can be used in a rebar. When the window is resized, the arrows and menu are aligned to the left border. The search box and icon are aligned to the right border. This means, that it's the gap between the two parts of the rebar, that is resized. The first version of the examples was created autumn 2013 with AutoIt 3.3.8. These examples are not running under 3.3.10. This is an update for 3.3.10. Update 2014-05-04: AutoIt 3.3.10 All the examples in this update are based on a rebar. The code is optimized, and there are several bug fixes. This is a list of the examples: ToolbarReBar1.au3 - just a toolbar menu and a search box ToolbarReBar2.au3 - the example in the picture ToolbarReBar3.au3 - the right arrow is moved to the right side of the menu ToolbarReBar4.au3 - the top menu items (not custom drawn) are provided with an icon ToolbarReBar5.au3 - same as 4 but the top menu items are custom drawn ToolbarReBar6.au3 - the top menu buttons are split buttons ToolbarReBar7.au3 - added 4 buttons on the right side of the menu ToolbarReBar8.au3 - same as 7 but the 4 buttons can be replaced dynamically ToolbarReBar9.au3 - the drop down menus are replaced with custom controls The buttons in a toolbar are often used to open a drop down menu. Example 9 shows how the buttons can be used to open various controls. The buttons are still hot-track enabled. This is a picture of example 9: HotToolbar3.3.10.7z Testet on XP 32 bit and Win 7 32/64 bit. First version october 2013: AutoIt 3.3.8
    3 points
  2. A StringRegExpReplace method. Local $vWord = "AA:BB:CC" Local $vConstantWord = "12345_5678" Local $vOutput = StringRegExpReplace($vConstantWord, "(^[^_]+)(.+)$", "${1}" & StringRegExpReplace($vWord, "^.+(\w):(\w{2})$", "\1\2") & "${2}") ConsoleWrite($vOutput & @LF)
    1 point
  3. Seek and you shall find A little sweat, and are the results Why not just do this: Run('C:\Windows\System32\SystemPropertiesPerformance.exe') WinWait('Performance Options') ControlClick("Performance Options", "", "[Button1]") ControlClick("Performance Options", "", "[TEXT:OK]") ProcessClose("VisualEffects.exe") If it does not work, carefully check the name of this Button. Because maybe just a matter
    1 point
  4. Hi, thanks for getting back to me. Unfortunately, the code doesn't seem to close / click OK after it loads the program. EDIT: Realised it was a language issue. Got it working now, thanks so much. EDIT2: I realised that it was a bit more complicated than clicking OK. If anyone else has this issue, this is the script that works for me (I blame Steam for this issue. When Steam opens, the effects stop working properly). Note that VisualEffects.exe is the name of the complied script EXE. For some reason it hangs around unless I tell it to close itself. Run('C:\Windows\System32\SystemPropertiesPerformance.exe') WinWait('Performance Options') ControlClick("Performance Options", "", "[CLASS:Button; INSTANCE:2]") ControlClick("Performance Options", "", "[CLASS:Button; INSTANCE:1]") ControlClick("Performance Options", "", "[CLASS:Button; INSTANCE:5]") ProcessClose ( "VisualEffects.exe" )
    1 point
  5. I thought #2 was answered by Melba23, didn't that answer your question? Exactly what are you attempting to do with #4 though? Your request can be read a couple of different ways.
    1 point
  6. Works fine here with this example so you will have to check your filenames or tell us what you are doing exactly. FileCreateShortcut(@WindowsDir & "\explorer.exe", @DesktopDir & "\ShortcutExample.lnk", @WindowsDir, "/e,c:\", "Tooltip description of the shortcut.", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE) Sleep(5000) FileDelete(@DesktopDir & "\ShortcutExample.lnk") Jos
    1 point
  7. mLipok

    UDP screen broadcast

    It is up to the application. To clarify the situation a little bit so I'll give you an illustrative example (without going into details) TCP sends checks that served data to the receiver, sends checks ...., sends checks ...., ....... UDP send, send, send, send, send, send, send, .... but does not check the data served to the recipient. That's more or less work (in a very brief outline), or at least I think so.
    1 point
  8. If the process is automated then why in the world would you read SciTE console, why would you use SciTE at all? Before you take JohnOne's advice think a bit about what you are doing because it looks like you are doing something wrong. Don't automate SciTE, automate tools SciTE automates.
    1 point
  9. Found this example in the AutoHotkey Forum. The example is too small for the Example Scripts so I have posted it here. I'm not asking for help. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <StaticConstants.au3> AutoItSetOption( "MustDeclareVars", 1 ) ;Globals Global $hGUI, $fGuiRolledUp = 0, $iTitleBarWidth = 150, $iTitleBarHeight = 20, $dllUser32 = DllOpen( "user32.dll" ) MainProgram() Func MainProgram() $hGUI = GUICreate( "RollGui", 300, 200, 650, 300, -1, $WS_EX_TOPMOST ) GUICtrlCreateLabel( "", 40, 40, 220, 120, $SS_ETCHEDFRAME ) GUICtrlCreateLabel( "Click outside the window to roll window up to small titlebar." & @CRLF & @CRLF & _ "Move cursor over titlebar to restore window.", 50, 50, 200, 100 ) GUIRegisterMsg( $WM_ACTIVATE, "WM_ACTIVATE" ) GUISetState( @SW_SHOW ) While 1 Local $msg = GUIGetMsg(1) Switch $msg[1] Case $hGUI Switch $msg[0] Case $GUI_EVENT_CLOSE ExitLoop EndSwitch EndSwitch If $fGuiRolledUp Then Sleep( 200 ) Local $mPos = MouseGetPos() Local $wPos = WinGetPos( $hGUI ) If $mPos[0] > $wPos[0] And $mPos[0] < $wPos[0] + $iTitleBarWidth _ And $mPos[1] > $wPos[1] And $mPos[1] < $wPos[1] + $iTitleBarHeight Then RollGuiDown( $hGUI ) EndIF EndIf WEnd GUIRegisterMsg( $WM_ACTIVATE, "" ) DllClose( $dllUser32 ) GUIDelete( $hGUI ) Exit EndFunc Func WM_ACTIVATE( $hWnd, $Msg, $wParam, $lParam ) Switch $hWnd Case $hGUI If Not $wParam Then If Not $fGuiRolledUp Then RollGuiUp( $hGUI ) EndIf EndIf EndSwitch Return $GUI_RUNDEFMSG EndFunc Func RollGuiUp( $hWnd ) Global $hRollGuiUp Local $wPos = WinGetPos( $hWnd ) Local $sBarName = WinGetTitle ( $hWnd ) $hRollGuiUp = GUICreate( $sBarName, $iTitleBarWidth, 0, $wPos[0], $wPos[1], BitXOR( $GUI_SS_DEFAULT_GUI, $WS_SYSMENU ), BitOR( $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST ) ) GUISetState( @SW_SHOW ) DllCall( $dllUser32, "int", "AnimateWindow", "hwnd", $hGUI, "int", 200, "long", "0x3000A" ) $fGuiRolledUp = 1 EndFunc Func RollGuiDown( $hWnd ) Global $hRollGuiUp DllCall( $dllUser32, "int", "AnimateWindow", "hwnd", $hGUI, "int", 200, "long", "0x20005" ) WinActivate( $hWnd ) GUIDelete( $hRollGuiUp ) $fGuiRolledUp = 0 EndFunc LarsJ
    1 point
×
×
  • Create New...