Read one line, enter it into a webfield, read the next...
Moderators: Dorian (MJT support), JRL
Sorry i didnt mention, it just showes me a screen capture of my desktop :Oadroege wrote:It does show you the first page of results. Isn't that what you are seeing?i think i have gotten a wrong impression about what that screencap actually does Razz i was hoping for it to show me what the Webpage would show haha.
Edit: Using this,
GetScreenRes>sX,sY
Min>min
Sec>sec
Hour>hour
ScreenCapture>0,0,sX,sY,c:\temp\cap.%hour%.%min%.%sec%.jpg
And to answer your other question about how to write results to a file this code works nicely.
Notice that it performs a google search on the text "macroscheduler" and then writes the result to the local file "c:\temp\search_result.html"
ExecuteFile command then launches your default browser and opens that local file - showing you a live webpage just as if you had typed in the search yourself.
Code: Select all
Let>page=http://www.google.com/search?h1=en&source=hp&q=
Let>searchterm=macroscheduler
Let>searchpage=%page%%searchterm%
HTTPRequest>searchpage,c:\temp\search_result.html,GET,,result
ExecuteFile>c:\temp\search_result.html
ExecuteFile command then launches your default browser and opens that local file - showing you a live webpage just as if you had typed in the search yourself.
The IE window never opens, so thats the reason i believe. No dual screens, no black screen, only a nice screenshot of my desktop, witch is acctually all i see when i run it aswell...adroege wrote:do you have multiple monitors, or some other weird setup?
Do you see Internet Explorer open when you run the macro script?
When I run your script, Internet Explorer is open, and captured in the screenshot.
Is my code wrong, do i need to trigger it to actually open a IE window aswell?
Edit: If i make an .exe, or run the script via the scheduler, it pops up with windows according to the searchterm lines in the .txt, once per searchterm, the popup contains the searchterm.
The sample code you used for the web stuff was generated by Web Recorder, did you install WebRecorder? The commands won't work anywhere besides the computer WebRecorder (specifically it's DLL) is installed in.
If you don't have, or want to pay for WebRecorder, it's possible to do the same stuff, only you have to code it in VBScript and put the code between VBStart> and VBEnd> blocks inside of Macro Scheduler. This is more advanced stuff - which was why WebRecorder was created to make it easier.
Here is info on WebRecorder
http://www.mjtnet.com/webrecorder.htm#
You can also get a free trial version of WebRecorder to use at this link:
http://www.mjtnet.com/dldfile.htm?file= ... ebRecorder
If you don't have, or want to pay for WebRecorder, it's possible to do the same stuff, only you have to code it in VBScript and put the code between VBStart> and VBEnd> blocks inside of Macro Scheduler. This is more advanced stuff - which was why WebRecorder was created to make it easier.
Here is info on WebRecorder
http://www.mjtnet.com/webrecorder.htm#
You can also get a free trial version of WebRecorder to use at this link:
http://www.mjtnet.com/dldfile.htm?file= ... ebRecorder
I was also thinking of this solution;
http://www.mjtnet.com/forum/viewtopic.php?t=4660
But really unsure how to intergrate it
http://www.mjtnet.com/forum/viewtopic.php?t=4660
But really unsure how to intergrate it
Don't create an exe. Just run it from Macro Scheduler. This should work.
To get it to work from an exe, a subdirectory has to be created with a special name to contain the DLL. Don't remember right at this moment what the name of the folder should be -- I would have to look it up.
But running it from Macro Scheduler is all automatic. You should see Internet Explorer open up and navigate to http://www.google.com.
Option #2 -----------------------
Use the code sample I gave you with HTTPRequest. You can modify as appropriate to put this in a loop and read the search terms from a file. All the results will be saved to local files. ExecuteFile can then be called multiple times to load all the results into separate windows or tabs of your default browser.
To get it to work from an exe, a subdirectory has to be created with a special name to contain the DLL. Don't remember right at this moment what the name of the folder should be -- I would have to look it up.
But running it from Macro Scheduler is all automatic. You should see Internet Explorer open up and navigate to http://www.google.com.
Option #2 -----------------------
Use the code sample I gave you with HTTPRequest. You can modify as appropriate to put this in a loop and read the search terms from a file. All the results will be saved to local files. ExecuteFile can then be called multiple times to load all the results into separate windows or tabs of your default browser.