Jump to content

IE and GetClip()


 Share

Recommended Posts

hi all im writing a few programs that will get the data from IE page by selecting the whole page and copying it to the clipboard where it is then writin to a file using the Getclip() function (_IEBodyReadText() isnt suitible in this case).

what i am worried about is there being a cross over (im using about 10 programs all with the same method) using the getclip() function and the wrong data being sent to the wrong script via the clipboard. Am i justified in my worry or does windows know and recognise what each program is doing

Link to comment
Share on other sites

I didn't read your first post carefully but u can use

$HTML=_IEHtmlBodyRead();[whatever get the source code, i don't remember exactly]
FileWrite("Code.txt",$HTML)

So you don't need to use GetClip()

[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

Can you verify hat you have tried _IEBodyReadText()? It acts on the page after all client-side processing.

The clipboard is a shared resource. You need to coordinate your use of it between your programs.

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

once again cheers dale

yes i have just tried the _IEBodyReadText again, i was confused the first time round i did it because the text seemed to be much more formated with spaces using the select all method however, it may become a nightmare checking and coordinating data in the clipboard between 10 or more programs so i think i will change to the _IEBodyReadText function

Link to comment
Share on other sites

It should not be a problem to keep track of which program you just used GetClip() on. Here is the solution from the Help:

WinGetTitle("[active]") returns the active window's title. WinGetTitle works on both minimized and hidden windows. If multiple windows match the criteria, the most recently active window is used.

LAST - Last window used in a previous AutoIt command

ACTIVE - Currently active window

I would use the 'LAST' command instead of active. Just do like this: $LastClipFrom = WinGetTitle("[last]") immediately after your GetClip().

HTH,

stumppc

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...