Compare commits
7 Commits
0e02ae24bd
...
738e1af443
| Author | SHA1 | Date | |
|---|---|---|---|
| 738e1af443 | |||
| f71def4542 | |||
| 20c2f44b0c | |||
| 997ee862ed | |||
| b378de8106 | |||
| ed307493b8 | |||
| 2860e4868f |
@@ -609,6 +609,33 @@ GetDateOrdinalSuffix(D) {
|
|||||||
|
|
||||||
; OnMsgbox - Custom Msgbox Screens
|
; OnMsgbox - Custom Msgbox Screens
|
||||||
;------------------------------------------------
|
;------------------------------------------------
|
||||||
|
|
||||||
|
ConfirmBeforeSubmitMsgboxFunc(){
|
||||||
|
/*
|
||||||
|
; Snippet to for check:
|
||||||
|
if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
SaveOrPostProgress(Message:=Message, PostType:="Tooltip,ErrorLoggingTextFile,ErrorSummaryVar,DiscordErrorLogging")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
OnMessage(0x44, "OnMsgBoxUserConfirmation")
|
||||||
|
MsgBox 0x21, User Confirmation, Please check that all data was input correctly and fix any mistakes and then click PROCEED to finalize the Upload.`n`nClick STOP to cancel the rest of this Upload and move on to the next website.
|
||||||
|
OnMessage(0x44, "")
|
||||||
|
IfMsgBox OK, {
|
||||||
|
return true
|
||||||
|
} Else IfMsgBox Cancel, {
|
||||||
|
Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.
|
||||||
|
Return %Message%
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
OnMsgBoxUpdateAvailable() {
|
OnMsgBoxUpdateAvailable() {
|
||||||
DetectHiddenWindows, On
|
DetectHiddenWindows, On
|
||||||
Process, Exist
|
Process, Exist
|
||||||
|
|||||||
@@ -721,21 +721,27 @@ Selenium_LoopToSendValueByName(ElementName,NumOfLoops:=1,SleepLength:=1000,Strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
Selenium_LoopToSendValueToXpath(Xpath,NumOfLoops:=1,SleepLength:=1000,StringTextContent:="",ClearElement:=0){
|
||||||
; Msgbox % "StringTextContent: " StringTextContent
|
|
||||||
; Msgbox % "ClearElement: " ClearElement
|
|
||||||
|
|
||||||
loop, %NumOfLoops% {
|
loop, %NumOfLoops% {
|
||||||
; msgbox % ClearElement
|
|
||||||
if(ClearElement){
|
if(ClearElement){
|
||||||
Loop, 3 { ; have to do it multiple times to make it trigger properly
|
Loop, 3 { ; sometimes have to do it multiple times to make it trigger properly
|
||||||
|
Try PreviousValue := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||||
|
|
||||||
try, driver.FindElementByXPath(Xpath).clear()
|
try, driver.FindElementByXPath(Xpath).clear()
|
||||||
sleep, 500
|
|
||||||
|
Try CurrentValue := driver.findelementbyxpath(Xpath).Attribute("value") ;Xpath Value
|
||||||
|
|
||||||
|
if(PreviousValue != CurrentValue){
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
sleep, 1000
|
||||||
|
; msgbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try driver.FindElementByXPath(Xpath).sendKeys(StringTextContent) ; Input Text
|
||||||
; ToolTip, Loop attempt: %A_index%
|
|
||||||
try driver.FindElementByXPath(Xpath).sendKeys(StringTextContent) ; Click on "upload image" button
|
|
||||||
catch e {
|
catch e {
|
||||||
if(A_index = NumOfLoops){
|
if(A_index = NumOfLoops){
|
||||||
Return "Failed"
|
Return "Failed"
|
||||||
|
|||||||
71
Shared-GoTos.ahk
Normal file
71
Shared-GoTos.ahk
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
; This #include needs to be at the bottom of the parent script
|
||||||
|
|
||||||
|
|
||||||
|
CheckForUpdates:
|
||||||
|
; The GUI buttons must have variable set to vUpdateAvailable and vChromeUpdateAvailable for button to get updated
|
||||||
|
|
||||||
|
; The following variables need to be set in the parent script
|
||||||
|
; GitReleasesAPIURL
|
||||||
|
; ChromeFilepath
|
||||||
|
|
||||||
|
Message = Checking for Updates
|
||||||
|
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
||||||
|
|
||||||
|
|
||||||
|
if(CheckForUpdates(GitReleasesAPIURL)){
|
||||||
|
GuiControl,,UpdateAvailable, Update Available!
|
||||||
|
}
|
||||||
|
|
||||||
|
if(CheckForChromeUpdates(ChromeFilepath)){
|
||||||
|
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
|
||||||
|
ChromeUpdateAvailable := 1
|
||||||
|
}
|
||||||
|
ToolTip
|
||||||
|
Return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
UpdateChrome:
|
||||||
|
|
||||||
|
if(CheckForChromeUpdates = "")
|
||||||
|
Status := CheckForChromeUpdates(ChromeFilepath)
|
||||||
|
|
||||||
|
if(!status){
|
||||||
|
OnMessage(0x44, "OnMsgBoxConfirmChromiumOverwrite")
|
||||||
|
MsgBox 0x41, Already Up-to-Date, Yor current Chromium version is already up to date. `nDo you want to download and overwrite it?
|
||||||
|
OnMessage(0x44, "")
|
||||||
|
|
||||||
|
IfMsgBox OK, {
|
||||||
|
Return
|
||||||
|
} Else IfMsgBox Cancel, {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Status := DownloadLatestChromium()
|
||||||
|
if(Status)
|
||||||
|
GuiControl,,ChromeUpdateAvailable, Chrome Up-to-Date
|
||||||
|
|
||||||
|
|
||||||
|
Return
|
||||||
|
/*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
PasteClipboardToEditBox:
|
||||||
|
if(A_GuiControl = "PasteClipboardToSMPBody"){
|
||||||
|
GuiControl,,PostBody, %Clipboard%
|
||||||
|
}
|
||||||
|
|
||||||
|
if(A_GuiControl = "PasteClipboardToSMPTitle"){
|
||||||
|
GuiControl,,PostTitle, %Clipboard%
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Return
|
||||||
@@ -1,21 +1 @@
|
|||||||
; This #include needs to be at the bottom of the parent script
|
; Code migrated to Shared-GoTo's
|
||||||
|
|
||||||
|
|
||||||
CheckForUpdates:
|
|
||||||
; The GUI buttons must have variable set to vUpdateAvailable and vChromeUpdateAvailable for button to get updated
|
|
||||||
|
|
||||||
; The following variables need to be set in the parent script
|
|
||||||
; GitReleasesAPIURL
|
|
||||||
; ChromeFilepath
|
|
||||||
|
|
||||||
Message = Checking for Updates
|
|
||||||
SaveOrPostProgress(Message:=Message,PostType:="Tooltip,ErrorLoggingTextFile,DiscordErrorLogging")
|
|
||||||
|
|
||||||
if(CheckForUpdates(GitReleasesAPIURL))
|
|
||||||
GuiControl,,UpdateAvailable, Uploader Update Available!
|
|
||||||
|
|
||||||
if(CheckForChromeUpdates(ChromeFilepath)){
|
|
||||||
GuiControl,,ChromeUpdateAvailable, Chrome Update Available!
|
|
||||||
ChromeUpdateAvailable := 1
|
|
||||||
}
|
|
||||||
Return
|
|
||||||
Reference in New Issue
Block a user