Jump to content
zemkor

Help with upload image to website

Recommended Posts

zemkor

Hello, i have question. I making script for automatic selling things on website. Web is simple form, but problem is upload photo on web. How upload pictures from specific folder in pc to site ? Thanks for answer.

Share this post


Link to post
Share on other sites
MikahS

You'll need to interact with the uploading dialog of the webpage.

Have you tried this yet? If so, please post your code.


Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Share this post


Link to post
Share on other sites
zemkor

I have only this. In attachement is code from google chrome.

 

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 453, 289, 534, 409)
Global $Button1 = GUICtrlCreateButton("Pridanie inzerátu", 32, 40, 121, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            Pridat()
    EndSwitch
WEnd


Func Pridat ()
    Global $oIE = _IECreate ("http://mobil.bazos.sk/pridat-inzerat.php")


Send ("{ENTER}")
Send ("{TAB 45}")
Send ("{DOWN}")
Send ("{ENTER}")
Send ("{TAB}")
Send ("{DOWN 17}")
Send ("{ENTER}")
Send ("{TAB}")
Send ("MY TEXT")
Send ("{TAB}")
Send ("MY TEXT.")
Send ("{TAB}")
Send ("{2}")
Send ("{TAB 2}")
Send ("83106")
Exit
EndFunc

 

code.jpg

Share this post


Link to post
Share on other sites
ViciousXUSMC

If it is your website you may have FTP access that is how I always updated my website.

Then you can use the AutoIT FTPex.au3 UDF

 

Edit: Nevermind your trying to automate a 3rd party page not just upload an image to a site like I thought. 

Edited by ViciousXUSMC

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.