muhmuuh Posted March 5, 2008 Share Posted March 5, 2008 Hello! I'm developing a program that checks my mail for new letters and sends ones. It was not so hard but now I'm stuck. I created all the rest but I can't make it to write the email text on the text area. Would you please help me? This should be the text area for the body text <textarea name="Body" id="bodyfield" style="display:none;"></textarea> but $body = _IEGetObjByName($ie, "Body") _IEFormElementSetValue($body, "Hello!") or $body = _IEGetObjById($ie, "bodyfield") _IEFormElementSetValue($body, "Hello!") doesn't work and I don't understand why. What am I doing wrong? Thanks I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
d4rk Posted March 5, 2008 Share Posted March 5, 2008 try to use send("{TAB}") ! [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
Xand3r Posted March 5, 2008 Share Posted March 5, 2008 i don't think that send() is what he wants.... i think he really wants to do it with the _ie funcs ... btw it should work... Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
muhmuuh Posted March 5, 2008 Author Share Posted March 5, 2008 try to use send("{TAB}") !I really try to evade all send("{TAB}") and mouseclick functions in my programs as they don't work sometimes as you want and personaly I think it is some kind of unprofessional (is there a word like this?) I try to do it in the right (and also hard) way.@alexmadman it realy doesn't wokany suggestions? I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
d4rk Posted March 5, 2008 Share Posted March 5, 2008 I really try to evade all send("{TAB}") and mouseclick functions in my programs as they don't work sometimes as you want and personaly I think it is some kind of unprofessional (is there a word like this?) I try to do it in the right (and also hard) way.@alexmadman it realy doesn't wokany suggestions?yea yeah, go with your professtional, i'm sick of listening these words !I'm developing a program that checks my mailyou told that you write this for yourself so who'll use it ? and will they say that "OMg, he's noob" with the TAB sendkey ?and personal to me, a program works is more important than how it works [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
DaleHohm Posted March 5, 2008 Share Posted March 5, 2008 Hello! I'm developing a program that checks my mail for new letters and sends ones. It was not so hard but now I'm stuck. I created all the rest but I can't make it to write the email text on the text area. Would you please help me? This should be the text area for the body text <textarea name="Body" id="bodyfield" style="display:none;"></textarea> but $body = _IEGetObjByName($ie, "Body") _IEFormElementSetValue($body, "Hello!") or $body = _IEGetObjById($ie, "bodyfield") _IEFormElementSetValue($body, "Hello!") doesn't work and I don't understand why. What am I doing wrong? ThanksYour code looks fine, however, given the choice I would use the ID=bodyfield rather than the name=body as the later has the potential of confusing the DOM because of potential name confusion with the BODY element. Are there any messages sent to the SciTe console? If you have the right element and it is not working, I would expect there to be. If there are no messages to the console, the most likely issue is that you don't actually have the correct element, it is working, but the text is not going where you expect it. You may want to verify by looking at things like _IEPropertyGet($body, "outerHTML") to insure it is what you expect it to be. Also, strongly suggest using DebugBar if you are not already. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
muhmuuh Posted March 5, 2008 Author Share Posted March 5, 2008 (edited) Your code looks fine, however, given the choice I would use the ID=bodyfield rather than the name=body as the later has the potential of confusing the DOM because of potential name confusion with the BODY element. Are there any messages sent to the SciTe console? If you have the right element and it is not working, I would expect there to be. If there are no messages to the console, the most likely issue is that you don't actually have the correct element, it is working, but the text is not going where you expect it. You may want to verify by looking at things like _IEPropertyGet($body, "outerHTML") to insure it is what you expect it to be. Also, strongly suggest using DebugBar if you are not already. Dale Thank you, Dale There are no messages to the console. I think this is the right element because it is below a button and above a checkbox and its code appears right after the button code and just before the checkbox code. I downloaded DebugBar and looks awesome. It will save me a lot of time in future. When I draged the target from the debugbar to the text area this is what I got <BODY id=0 style="FONT-SIZE: 10pt; BACKGROUND-IMAGE: none; FONT-FAMILY: arial"></BODY> In situations like this when I'm not sure that I'm working with the right element I do this $br=0 $forms = _IEFormGetCollection($ie) For $form in $forms $elements = _IEFormElementGetCollection($form) For $i in $elements $br+=1 _IEFormElementSetValue($i, $br) Next NextoÝ÷ ÙK.jYriû^®ØZ´Ç¶§ºfÞ®íçâzWZÛazwhjëh×6If $br==$elnum Then _IEPropertyGet($i, "outerHTML") but now all other fields get a number EXCEPT the one that I need and again I have no idea why. Does it have something to with the thing that style="display:none;"? Any other sugestions? Thanks Edited March 5, 2008 by muhmuuh I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
muhmuuh Posted March 6, 2008 Author Share Posted March 6, 2008 (edited) Yey I found a solution! There is a img link 'Paste' so I do _ClipBoard_SetData ("Hello!") _IEImgClick($ie, $paste) but I still would like to learn how to make it with the IE functions Edited March 6, 2008 by muhmuuh I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more. Link to comment Share on other sites More sharing options...
DaleHohm Posted March 6, 2008 Share Posted March 6, 2008 OK, I do think there is some name confusion or confusion on your part. Please notice that your first post included a textarea and you last with DebugBar showed a BODY element. Something's wrong. Is there an iFrame involved? Is there more than one element with the same ID? Either the DOM is confused by name collision, there are frames, or you're confused by the page structure. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble 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