Skip to content

Commit

Permalink
v.2.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
philpw99 committed Dec 28, 2022
1 parent 7c53e4d commit 4d4013c
Show file tree
Hide file tree
Showing 40 changed files with 25,450 additions and 2,005 deletions.
1,772 changes: 1,772 additions & 0 deletions source/Backup/wd_core.au3

Large diffs are not rendered by default.

2,032 changes: 2,032 additions & 0 deletions source/Backup/wd_helper.au3

Large diffs are not rendered by default.

74 changes: 36 additions & 38 deletions source/Forms/Initial Settings.isf
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#include <GuiTab.au3>
#include <EditConstants.au3>

If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware")

$Initial_Settings = GUICreate("Initial Settings",1326,809,-1,-1,-1,-1)
$tab = GUICtrlCreatetab(40,69,1201,673,-1,-1)
GuiCtrlSetState(-1,2048)
Expand Down Expand Up @@ -81,6 +79,42 @@ _GUICtrlTab_SetCurFocus($tab,0)


#cs
[gui]
Handle_deklaration=default
Handle_deklaration_const=false
title=Initial Settings
breite=1326
hoehe=809
style=-1
exstyle=-1
bgcolour=0xF0F0F0
bgimage=none
handle=$Initial_Settings
parent=
code=
codebeforegui=
xpos=-1
ypos=-1
center_gui=true
title_textmode=normal
isf_include_once=false
only_controls_in_isf=false
const_modus=default
gui_code_in_function=false
gui_code_in_function_name=
gui_event_close=
gui_event_minimize=
gui_event_restore=
gui_event_maximize=
gui_event_mousemove=
gui_event_primarydown=
gui_event_primaryup=
gui_event_secoundarydown=
gui_event_secoundaryup=
gui_event_resized=
gui_event_dropped=
defaultfont=MS Sans Serif
defaultfontsize=8
[tab]
type=tab
handle=432
Expand Down Expand Up @@ -128,42 +162,6 @@ page=1
text=Start
textmode=text
handle=
[gui]
Handle_deklaration=default
Handle_deklaration_const=false
title=Initial Settings
breite=1326
hoehe=809
style=-1
exstyle=-1
bgcolour=0xF0F0F0
bgimage=none
handle=$Initial_Settings
parent=
code=
codebeforegui=If Not (@Compiled ) Then DllCall("User32.dll","bool","SetProcessDPIAware")
xpos=-1
ypos=-1
center_gui=true
title_textmode=normal
isf_include_once=false
only_controls_in_isf=false
const_modus=default
gui_code_in_function=false
gui_code_in_function_name=
gui_event_close=
gui_event_minimize=
gui_event_restore=
gui_event_maximize=
gui_event_mousemove=
gui_event_primarydown=
gui_event_primaryup=
gui_event_secoundarydown=
gui_event_secoundaryup=
gui_event_resized=
gui_event_dropped=
defaultfont=MS Sans Serif
defaultfontsize=8
[0x00091D60]
type=label
handle=433
Expand Down
58 changes: 41 additions & 17 deletions source/Forms/SettingsForm.au3
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,38 @@ Func ShowSettings()
GUICtrlCreateGroup("Preferred Browser",31,133,417,273,$BS_CENTER,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")

GUICtrlCreateLabel("Drivers",292,174,83,24,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetBkColor(-1,"-2")

; Choose browser radios and update buttons
Global $radioChooseFirefox = GUICtrlCreateRadio("Firefox",84,204,147,38,-1,-1)
Global $radioChooseFirefox = GUICtrlCreateRadio("Firefox",84,180,147,38,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")

Local $btnUpdateFirefox = GUICtrlCreateButton("Update",280,213,112,32,-1,-1)
Local $btnUpdateFirefox = GUICtrlCreateButton("Update",280,185,112,32,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetTip(-1,"Update this web driver only when Firefox is not under control any more.")

Global $radioChooseChrome = GUICtrlCreateRadio("Chrome",84,256,147,38,-1,-1)
Global $radioChooseChrome = GUICtrlCreateRadio("Chrome",84,220,147,38,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")

Local $btnUpdateChrome = GUICtrlCreateButton("Update",280,263,112,32,-1,-1)
Local $btnUpdateChrome = GUICtrlCreateButton("Update",280,225,112,32,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetTip(-1,"Update this web driver only when Chrome is not under control any more.")

Global $radioChooseEdge = GUICtrlCreateRadio("MS Edge",84,304,147,38,-1,-1)
Global $radioChooseEdge = GUICtrlCreateRadio("MS Edge",84,260,147,38,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")

Local $btnUpdateEdge = GUICtrlCreateButton("Update",280,311,112,32,-1,-1)
Local $btnUpdateEdge = GUICtrlCreateButton("Update",280,265,112,32,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetTip(-1,"Update this web driver only when MS Edge is not under control any more.")

Global $radioChooseOpera = GUICtrlCreateRadio("Opera",84,300,147,38,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")

Local $btnUpdateOpera = GUICtrlCreateButton("Update",280,305,112,32,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
GUICtrlSetTip(-1,"Update this web driver only when Opera is not under control any more.")


; Button to specify browser exe location.
$btnExeLocation = GUICtrlCreateButton("Browser EXE Location ...",84,356,308,38,-1,-1)
$btnExeLocation = GUICtrlCreateButton("Browser EXE Location ...",84,350,308,38,-1,-1)
GUICtrlSetFont(-1,10,400,0,"Tahoma")
If $gsBrowserLocation <> "" Then
GUICtrlSetTip(-1,"Currently location: " & $gsBrowserLocation & @CRLF & "Leave it empty to use default location.")
Expand Down Expand Up @@ -293,6 +297,8 @@ Func ShowSettings()
$sBrowser = "Chrome"
Case GUICtrlRead($radioChooseEdge) = $GUI_CHECKED
$sBrowser = "Edge"
Case GUICtrlRead($radioChooseOpera) = $GUI_CHECKED
$sBrowser = "Opera"
EndSelect
RegWrite($gsRegBase, "Browser", "REG_SZ", $sBrowser)
If $sBrowser <> $stashBrowser Then $bRestartRequired = True
Expand Down Expand Up @@ -411,17 +417,35 @@ Func ShowSettings()
$sSession = _WD_CreateSession($sDesiredCapabilities)
OpenURL($stashURL)
EndIf

Case $btnUpdateOpera
If $stashBrowser = "Opera" Then
_WD_DeleteSession($sSession)
_WD_Shutdown()
EndIf
Local $b64 = ( @OSArch = "X64" )
Local $bGood = _WD_UPdateDriver ("opera", @AppDataDir & "\Webdriver" , $b64 , True) ; Force update
If Not $bGood Then
MsgBox(48,"Error Getting Opera Driver", _
"There is an error getting the driver for Opera. Maybe your Internet is down?" _
& @CRLF & "The program will try to get the driver again next time you launch it.",0)
Else
MsgBox(64,"Opera Driver Updated","Opera webdriver just updated to the latest version.",0)
EndIf
If $stashBrowser = "Opera" Then
SetupOpera()
_WD_Startup()
$sSession = _WD_CreateSession($sDesiredCapabilities)
OpenURL($stashURL)
EndIf

Case $btnExeLocation
If GUICtrlRead( $radioChooseEdge) = $GUI_CHECKED Then
MsgBox( 0, "Cannot set exe for Edge", "Sorry. Cannot find a way to change default exe for Microsoft Edge.")
ContinueLoop
EndIf

Local $sExePath = FileOpenDialog( "Choose the Browser Exe file", @ProgramFilesDir & "\", "Exe Files (*.exe)", $FD_FILEMUSTEXIST )
If @error Then
$sBrowserLocation = "unchanged"
MsgBox( $MB_SYSTEMMODAL, "Cancelled", "No file was selected.")
$sBrowserLocation = ""
MsgBox( $MB_SYSTEMMODAL, "Cancelled", "Now the Exe location is empty.")
GUICtrlSetTip($btnExeLocation, "Currently location: empty" & @CRLF & "Leave it empty to use default location.")
Else
$sBrowserLocation = $sExePath
GUICtrlSetTip($btnExeLocation, "Currently location: " & $sBrowserLocation & @CRLF & "Leave it empty to use default location.")
Expand Down
12 changes: 12 additions & 0 deletions source/Forms/test.isf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#cs
[gui]
title=test
breite=350
hoehe=350
style=-1
exstyle=-1
bgcolour=0xF0F0F0
bgimage=none
handle=test
#ce

Loading

0 comments on commit 4d4013c

Please sign in to comment.