Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/17/2023 in all areas

  1. ioa747

    full screen gui

    Here an example to switch in/out full screen with F11 version 0.2 ; https://www.autoitscript.com/forum/topic/210078-full-screen-gui/?do=findComment&comment=1516762 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region (=== GUI generated by GuiBuilderPlus 1.0.0-beta4 ===) Global $hGUI = GUICreate("MyGUI", 400, 350, 760, 365, -1, -1) Global $idFullScreen = GUICtrlCreateDummy() #EndRegion (=== GUI generated by GuiBuilderPlus 1.0.0-beta4 ===) _main() ;------------------------------------------------------------------------------ ; Title...........: _main ; Description.....: run the main program loop ;------------------------------------------------------------------------------ Func _main() GUISetState(@SW_SHOW) Local $aAccelKeys[1][2] = [["{F11}", $idFullScreen]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idFullScreen _FullScreen() Case Else ; EndSwitch Sleep(10) WEnd EndFunc ;==>_main ;------------------------------------------------------------------------------ Func _FullScreen() Local Static $aWPos, $aGUIStyle = GUIGetStyle($hGUI), $iFullScreen = 0 If $iFullScreen = 0 Then $aWPos = WinGetPos($hGUI) WinMove($hGUI, "", 0, 0, @DesktopWidth, @DesktopHeight) GUISetStyle(BitOR($WS_POPUP, $WS_EX_TOPMOST), -1) $iFullScreen = 1 Else WinMove($hGUI, "", $aWPos[0], $aWPos[1], $aWPos[2], $aWPos[3]) GUISetStyle($aGUIStyle[0], $aGUIStyle[1]) $iFullScreen = 0 EndIf EndFunc ;==>_FullScreen ;------------------------------------------------------------------------------ Please, leave your comments and experiences here. Thanks !
    1 point
  2. Fixed a little: #AutoIt3Wrapper_Run_AU3Check=Y #AutoIt3Wrapper_Au3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <MsgBoxConstants.au3> #include <String.au3> #include <Array.au3> #include "wd_helper.au3" #include "wd_capabilities.au3" Global $sSession _Example() Func _Example() ;~ $_WD_DEBUG = $_WD_DEBUG_None ; Could also use $_WD_DEBUG_Error ;~ $_WD_DEBUG = $_WD_DEBUG_Info ; Gives you optimized level of details $_WD_DEBUG = $_WD_DEBUG_Full ; Gives you the greatest level of details _WD_Option('console', @ScriptDir & "\wdudf.log") _WD_UpdateDriver('msedge') Local $sCapabilities = SetupEdge(False) _WD_Startup() $sSession = _WD_CreateSession($sCapabilities) MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "Wait after session creation") _WD_Navigate($sSession, "https://url:portnumber") _WD_Window($sSession, "maximize") _WD_LoadWait($sSession) ;~ Sleep(10000) Local $sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@id='details-button']") _WD_ElementAction($sSession, $sElement, 'click') ;~ Sleep(10000) MsgBox($MB_TOPMOST, "TEST #" & @ScriptLineNumber, "Wait before closing WebDriver") _WD_DeleteSession($sSession) _WD_Shutdown() EndFunc ;==>_Example Func SetupEdge($bHeadless) _WD_Option('Driver', 'msedgedriver.exe') _WD_Option('Port', 9515) _WD_Option('DriverParams', '--verbose') ;~ Local $sCapabilities = '{"capabilities": {"alwaysMatch": {"ms:edgeOptions": {"excludeSwitches": [ "enable-automation"]}}}}' _WD_CapabilitiesStartup() _WD_CapabilitiesAdd('alwaysMatch', 'msedge') _WD_CapabilitiesAdd('excludeSwitches', 'enable-automation') _WD_CapabilitiesAdd('args', 'user-data-dir', @LocalAppDataDir & '\Microsoft\Edge\User Data\WD_Testing_Profile') If $bHeadless Then _WD_CapabilitiesAdd('args', '--headless') _WD_CapabilitiesDump(@ScriptLineNumber) ; dump current Capabilities setting to console - only for testing in this demo Local $sCapabilities = _WD_CapabilitiesGet() Return $sCapabilities EndFunc ;==>SetupEdge focus on: Local $sCapabilities = SetupEdge(False) _WD_Startup() $sSession = _WD_CreateSession($sCapabilities) and: _WD_CapabilitiesAdd('args', 'user-data-dir', @LocalAppDataDir & '\Microsoft\Edge\User Data\WD_Testing_Profile')
    1 point
  3. ioa747

    full screen gui

    Thank you for your suggetions Updated the script. I hope I didn't miss something
    1 point
  4. Thanks Sounds like you trying to run the scripts on an older version of SciTE in stead of v5.2.5?
    1 point
  5. For future reference $Form1 = GUICreate("Form 1", 377, 280, 192, 114) WinSetOnTop($Form1,"",1) Worked and $Form1 = GUICreate("Form 1", 377, 280, 192, 114,0,$WS_EX_TOPMOST) also worked
    1 point
×
×
  • Create New...