From 45420c0b7bd1a7d9c76e96a8298a82eb574e2295 Mon Sep 17 00:00:00 2001 From: Yuriy Date: Wed, 4 Sep 2024 01:12:17 -0400 Subject: [PATCH] fixed tumblr tag input and attaching image if hyperlink exists --- Modules/Post-To-Tumblr.ahk | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Modules/Post-To-Tumblr.ahk b/Modules/Post-To-Tumblr.ahk index e081819..b95590c 100644 --- a/Modules/Post-To-Tumblr.ahk +++ b/Modules/Post-To-Tumblr.ahk @@ -60,7 +60,15 @@ if(status){ Return } + if(ImageAttachmentFilepath){ + ; Click into space below the preview image so the "add photo" button shows up + Xpath = (//div[@class='block-list-appender wp-block'])[1] + try, driver.FindElementByXPath(Xpath).click() + + ; Xpath = (//button[@title='Add photo'])[1] + ; Status := Selenium_LoopToClickXpath(Xpath:=Xpath,NumOfLoops:=2,SleepLength:=1000) + ; Click the Photo Icon on the next line down to attach an image Xpath = (//button[@title='Add photo'])[1] @@ -82,6 +90,17 @@ if(ImageAttachmentFilepath){ } +; Input Tags +Xpath = (//textarea[@placeholder='#add tags to help people find your post'])[1] + +try, driver.FindElementByXPath(Xpath).SendKeys(PostTags) +try, driver.SendKeys(driver.Keys.Enter) + + + + +sleep, 1000 + if (ConfirmBeforeSubmit && ConfirmBeforeSubmitMsgboxFunc() != true) { Message = User Selected STOP button when asked for confirmation. Cancelling Rest of Site Upload.