SnArF Posted September 3, 2015 Share Posted September 3, 2015 Hello,I'm using a raspberry PI with screenly.I have to upload 1000+ files and want to automate it but I can't figure out how.Please help, These are the step I need, 1.Open the site (see http://ose.demo.screenlyapp.com/ )2. Click Ad asset3. Click Upload and thnb click choose file4. set time and date5. saveThis is what i have so far#include <IE.au3> #include <MsgBoxConstants.au3> Local $oIE = _IECreate("http://ose.demo.screenlyapp.com/") _IELoadWait($oIE) Local $oDiv = _IEGetObjById($oIE, "add-asset-button") _IEAction($oDiv, "click") My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
Danp2 Posted September 3, 2015 Share Posted September 3, 2015 Instead of:Local $oDiv = _IEGetObjById($oIE, "add-asset-button") _IEAction($oDiv, "click")try this:_IELinkClickByText($oIE, "Add Asset") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
SnArF Posted September 3, 2015 Author Share Posted September 3, 2015 _IEAction($oDiv, "click") works fine but I can't figure out the next part My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
Celtic88 Posted September 3, 2015 Share Posted September 3, 2015 (edited) my first script with ie.au3 expandcollapse popup#pragma compile(AutoItExecuteAllowed, True) #include <IE.au3> #include <MsgBoxConstants.au3> Local $Filepathtosend = @ScriptFullPath If StringInStr($CmdLineRaw, "[filetosend]") > 0 Then $Filepathtosend = StringSplit($CmdLineRaw, "[filetosend]", 1) If @error Then Exit Local $hWnd = WinWait("[CLASS:#32770]", "", 1000) WinActivate($hWnd) WinWaitActive($hWnd) Sleep(500) Send($Filepathtosend[2] & "{TAB}{ENTER}") Exit EndIf Local $oIE = _IECreate("http://ose.demo.screenlyapp.com/") _IELoadWait($oIE) Local $oDiv = _IEGetObjById($oIE, "add-asset-button") _IEAction($oDiv, "click") _IELoadWait($oIE) Sleep(1000) _IELinkClickByText($oIE, "Upload") Local $oDiv = _IEGetObjByName($oIE, "file_upload") ShellExecute(@AutoItExe, " /AutoIt3ExecuteScript " & FileGetShortName(@ScriptFullPath) & " [filetosend]" & $Filepathtosend) _IEAction($oDiv, "click") $oLinks = _IETagNameGetCollection($oIE, "input") For $oLink In $oLinks If String($oLink.type) = "submit" And String($oLink.value) = "Save" Then _IEAction($oLink, "click") ExitLoop EndIf Next Edited September 3, 2015 by Celtic88 SnArF 1 Link to comment Share on other sites More sharing options...
SnArF Posted September 3, 2015 Author Share Posted September 3, 2015 THANKS!!! This works great! Celtic88 1 My scripts: _ConsoleWriteLog | _FileArray2D Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now