Medic873 Posted March 6, 2010 Share Posted March 6, 2010 Okay looked through the help guide and found this peice of code #include <IE.au3> $oIE = _IECreate ("Google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "Hello") _IEFormSubmit ($oForm, 0) _IELoadWait($oIE) Ive spent about 3 days on this code trying to figure out how to work it and cant for the life of me. I want to apply it to another webpage so ill change the web url but I know there is more to it then that because will say i want it to send "hello" but to dogpile instead i cant. Please help where can i find out what to put in instead of what is already there. I'm sorry if this is a little hard to understand. Link to comment Share on other sites More sharing options...
Medic873 Posted March 6, 2010 Author Share Posted March 6, 2010 Really please someone help this would answer so many questions for me. Link to comment Share on other sites More sharing options...
JRowe Posted March 6, 2010 Share Posted March 6, 2010 Please wait 24 hours before bumping your own threads. You need to read the documentation and understand what it's telling you to do. Basically, you have to look at the html, find the name of the form. In this case, the name of the form on the google homepage is "f". After you find the form name, then you need the name of the element in the form you want to write "hello" to. When you've found the form and the element, reconfigure the example with the appropriate URL, form, form element, and value. #include <IE.au3> ;This opens your IE to google.com $oIE = _IECreate ("Google.com") ;This gets a Form Object by its name. The form it tries to find is named "f" ;When it gets the form, $oForm is the Form Object. $oForm = _IEFormGetObjByName ($oIE, "f") ;This looks in the form object for a form element object named "q" ;When it finds "q" $oQuery is the form element object $oQuery = _IEFormElementGetObjByName ($oForm, "q") ;This sets the value of the $oQuery form element object _IEFormElementSetValue ($oQuery, "Hello") ;This activates the form (submits it as if you clicked submit.) _IEFormSubmit ($oForm, 0) _IELoadWait($oIE) [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Medic873 Posted March 7, 2010 Author Share Posted March 7, 2010 I am still extreamly lost where do you find out that the form is named F and the Queary on the webpage is Q maybe im missing somthing major. Link to comment Share on other sites More sharing options...
tobject Posted March 8, 2010 Share Posted March 8, 2010 (edited) I am still extreamly lost where do you find out that the form is named F and the Queary on the webpage is Q maybe im missing somthing major.Go to Page | View Source and look at raw HTMLeverything is thereYou'll need some basic knowledge of HTML tags to find what you're looking forUsually objects are indentified by their tags, Name, ID,<form name="q" action="post" ...>.....</form>Search HTML for "Form" and "Input" tags, that's usual elements for user input Edited March 8, 2010 by tobject Link to comment Share on other sites More sharing options...
guwguw Posted March 8, 2010 Share Posted March 8, 2010 Go to Page | View Source and look at raw HTMLeverything is thereYou'll need some basic knowledge of HTML tags to find what you're looking forUsually objects are indentified by their tags, Name, ID,<form name="q" action="post" ...>.....</form>Search HTML for "Form" and "Input" tags, that's usual elements for user inputAn excellent (free) tool to look at the full source code of HTML pages (after you saved them) is Notepad++If you load an HTML page there, you can choose "TextFX" from the menu, "TextFX HTML Tidy","TiDy clean Document NoWrap"This will result in a fully formatted and properly indented version of the HTML page in question. Full indentation helps the viewer spotting the proper relationships between tags and other page design elements.In your example, you would receive a legible HTML page - admittedly, Google pages used to be way simpler when the Help sample in AutoIt was written than they are now, lol - containing tobject's text.If you are not so "visually" dependent like me, you could just look at the source code, as tobject indicated and see if they let you search for "<form" and similar items - but that can become rather difficult and look confusing with at a fully developed page.For more info, we probably would need at least the extracted part of the HTML where the form request takes place. Link to comment Share on other sites More sharing options...
Medic873 Posted March 8, 2010 Author Share Posted March 8, 2010 Okay im sorry maybe im just a little lost I am starting to understand it. Can you please provide me with a example this is the web url http://onlinetextmessage.com/ im trying to make it where when the script is done it will send me a text message saying it is done. so i have it open the url but what is the form for the mobile number. and then just have it send ($phonenumber); ya its quite simple but if you could provide me with this example I can take it from there just need a little boost thank you Link to comment Share on other sites More sharing options...
guwguw Posted March 9, 2010 Share Posted March 9, 2010 (edited) Now you are getting mysterious ... im trying to make it where when the script is done it will send me a text message saying it is done. It's not clear, what script you are referring to. Are you saying you already have a script that calls up the URL and once the page is loaded you want a text message (in whatever form)? Or are you asking for a notification once the page has been filled out and submitted? so i have it open the url but what is the form for the mobile number.So that you can follow the logic, here are the steps I used to get the info you are asking for: Using IE, I called up your URL I clicked on Tools, Developer Tools, and selected the tab "Script", looking for anything following the "Mobile Number (to): (XXXXXXXXXX)" and a reference to the <form> tag before it. I found <form action="send.php" method="post" name="txtmsg" onsubmit="return validateForm(this);"> ... <tbody> <tr> <td> <p style="margin-left: 5px;"> <font style="font-size: 70%;" face="Arial"> <input name="number" size="20" maxlength="15" type="text"> </font></p></td> </tr> </tbody> ... <input value="Send Message" name=s type="submit"><br><font face=ARIAL size=1 This reveals that the name of the form is "txtmsg" and the input field is "number". With the appropriate code $phonenumber = "090012314567" $oIE = _IEAttach("Free Text Messaging") _IELoadWait($oIE) $oForm = _IEFormGetObjByName($oIE, "txtmsg") $oText = _IEFormElementGetObjByName($oForm, "number") $phonedial = _IEFormElementSetValue($oText, $phonenumber) ... _IEFormSubmit($oForm)The middle three lines (after _IELoadWait) are the "input procedure" - you'll have to figure out the other fields for yourself ... Not knowing which version of AutoIt you are using, I can't tell, if the last line triggers the button "Send Message". It might need to be _IELinkClickByText($oForm, "Send Message") and then just have it send ($phonenumber); ya its quite simple but if you could provide me with this example I can take it from there just need a little boost thank you If anybody else sees an error, please correct me, because I adapted the above AutoIt lines from an existing, much more involved program I have running and might have overlooked some details. Edited March 9, 2010 by guwguw Link to comment Share on other sites More sharing options...
Fulano Posted March 9, 2010 Share Posted March 9, 2010 It's annoying to install software, but you might try installing Google's Chrome browser. It has an incredible interface for examining page source code. You context-click on the page element and select 'Inspect Element' and it opens a collapsible tree of the source code at the relevant section. It also highlights the currently selected element on the page. It's really, really nice. #fgpkerw4kcmnq2mns1ax7ilndopen (Q, $0); while ($l = <Q>){if ($l =~ m/^#.*/){$l =~ tr/a-z1-9#/Huh, Junketeer's Alternate Pro Ace /; print $l;}}close (Q);[code] tag ninja! Link to comment Share on other sites More sharing options...
Medic873 Posted March 10, 2010 Author Share Posted March 10, 2010 Ya I figured out how to do this right before that post yesterday and im already using chrome and love that feture thank you everyone although here is my new issue I have it input all the data and click send text but then it takes me to a ad you know and I need to click no thanks witch turns out to me a image. And for some reason it wont work i know i have the image click function right i use it all the time with google here is the url for the page that i cant click no thanks on http://onlinetextmessage.com/send.php any help on this would be great Link to comment Share on other sites More sharing options...
JRowe Posted March 10, 2010 Share Posted March 10, 2010 That's a helluva shady site. You'd be better off sending texts directly via the SMS provider. For example, Verizon numbers (for example, (123)456-7890, can receive text messages as emails sent to 1234567890@vtext.com The 140 character limit still applies. Who are you looking to text? What are you texting to them? [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
Medic873 Posted March 10, 2010 Author Share Posted March 10, 2010 It is made to text me. If my application gets off it will text me saying its off. Link to comment Share on other sites More sharing options...
JRowe Posted March 10, 2010 Share Posted March 10, 2010 Then use trancexx's mailer to send an email (text) to your cell phone number. If you have verizon, then send the email to "YourNumber@vtext.com." Whatever your cell email is, all you need to do is automate trancexx's GUI, which is a lot easier (and a lot more educational) than mucking about with an ad infested PoS site like that. http://www.autoitscript.com/forum/index.php?showtopic=104288 [center]However, like ninjas, cyber warriors operate in silence.AutoIt Chat Engine (+Chatbot) , Link Grammar for AutoIt , Simple Speech RecognitionArtificial Neural Networks UDF , Bayesian Networks UDF , Pattern Matching UDFTransparent PNG GUI Elements , Au3Irrlicht 2Advanced Mouse Events MonitorGrammar Database GeneratorTransitions & Tweening UDFPoker Hand Evaluator[/center] Link to comment Share on other sites More sharing options...
08761288115 Posted April 13, 2010 Share Posted April 13, 2010 Now you are getting mysterious ... It's not clear, what script you are referring to. Are you saying you already have a script that calls up the URL and once the page is loaded you want a text message (in whatever form)? Or are you asking for a notification once the page has been filled out and submitted? So that you can follow the logic, here are the steps I used to get the info you are asking for: Using IE, I called up your URL I clicked on Tools, Developer Tools, and selected the tab "Script", looking for anything following the "Mobile Number (to): (XXXXXXXXXX)" and a reference to the <form> tag before it. I found <form action="send.php" method="post" name="txtmsg" onsubmit="return validateForm(this);"> ... <tbody> <tr> <td> <p style="margin-left: 5px;"> <font style="font-size: 70%;" face="Arial"> <input name="number" size="20" maxlength="15" type="text"> </font></p></td> </tr> </tbody> ... <input value="Send Message" name=s type="submit"><br><font face=ARIAL size=1 This reveals that the name of the form is "txtmsg" and the input field is "number". With the appropriate code $phonenumber = "090012314567" $oIE = _IEAttach("Free Text Messaging") _IELoadWait($oIE) $oForm = _IEFormGetObjByName($oIE, "txtmsg") $oText = _IEFormElementGetObjByName($oForm, "number") $phonedial = _IEFormElementSetValue($oText, $phonenumber) ... _IEFormSubmit($oForm)The middle three lines (after _IELoadWait) are the "input procedure" - you'll have to figure out the other fields for yourself ... Not knowing which version of AutoIt you are using, I can't tell, if the last line triggers the button "Send Message". It might need to be _IELinkClickByText($oForm, "Send Message") If anybody else sees an error, please correct me, because I adapted the above AutoIt lines from an existing, much more involved program I have running and might have overlooked some details. Can you please write the same code for a G-mail..i mean for the https://gmail.com....it will very helpful for me. 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