Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
COPY AND PASTE FROM NOTEPAD TO BROWSER
#1
hello,

i just started using this and i need help.

This is my situation,

I will record a script, open browser then go yahoo.com/mary

then yahoo.com/john

then yahoo.com/alex

and so on.. (over 1000+ names on notepad)

I have usernames on NOTEPAD, what is the easiest way to copy and paste these names to browser?
#2
any help would be appreciated, thanks
#3
Easiest way is to record it. When recording, use keys. For example, to select/copy a line and go to the next line, can be used

Shift+End
Ctrl+C
Home
Down arrow
#4
if theres 1000 lines on notepad, does that mean i have to keep recording it until i get to 1000 lines? or just record the first line then add some codes to keep going until 1000?

sorry, very very new
#5
Gintaras Wrote:Easiest way is to record it. When recording, use keys. For example, to select/copy a line and go to the next line, can be used

Shift+End
Ctrl+C
Home
Down arrow


how do i repeat this 1000 times?
#6
It is easy to repeat. Use rep. It is described in help an in tips. But I think the macro should wait until the page is fully loaded. Maybe easier would be to create macro for single URL, without repeating. Then assign some hotkey trigger (eg F6), and press the hotkey for each URL.
#7
I would use this instead:

Code:
Copy      Help
str s sf.getfile("file that contains these URLs")
foreach s sf
,web s 1

Note: web waits until the page is fully loaded, but only in Internet Explorer and IE-based browsers.
#8
what im trying to do is submit my site to directory..

so i will be basically go to 1 website, then type infos, then second website, type infos and so on. upto 1000.

so i will record the first URL(yahoo.com), then use REP ..

now when i use REP code, this will repeat the whole thing, which will go to yahoo.com again,

how do i go to msn.com instead of yahoo.com on the second time? then google the third time? so on.....
#9
Quote:now when i use REP code, this will repeat the whole thing, which will go to yahoo.com again

No, it will select new line each time, because of Home and Down Arrow.
#10
Gintaras Wrote:I would use this instead:

Code:
Copy      Help
str s sf.getfile("file that contains these URLs")
foreach s sf
,web s 1

Note: web waits until the page is fully loaded, but only in Internet Explorer and IE-based browsers.

okay this is working!

now how/where do i insert a code to type infos?

yahoo.com then type infos... blah blah blah
then google.com type infos... blah blah blah
so on...


I will basically use the same infos on every url
#11
Code:
Copy      Help
str s sf.getfile("file that contains these URLs")
foreach s sf
,web s 1
,PLACE THE CODE HERE
,HOW - depends on web page, and works only if all pages are similar
#12
Gintaras Wrote:
Code:
Copy      Help
str s sf.getfile("file that contains these URLs")
foreach s sf
,web s 1
,PLACE THE CODE HERE
,HOW - depends on web page, and works only if all pages are similar

all websites are the same just different URLS
#13
I cannot say exactly how if I don't see the page. Again, you can record (you can record part of macro). Or use "html element actions" dialog.
#14
its getting there but it only TYPES INFO on the LAST URL

go to..

url1.com
url2.com
url3.com
url4.com
url5.com
Type infos

i want to type infos inbetween

url1.com
Type infos
url2.com
Type infos
url3.com
Type infos


Thats what i need and im good to go...
#15
Quote:str s sf.getfile("C:\Documents and Settings\test.txt")
foreach s sf
,web s 1
spe 10
int w1=act(win("Welcome to your control panel - Windows Internet Explorer" "IEFrame"))
lef 458 491 w1; 1.38
'MESSAGE TEST TEST TEST; 0.97
lef+ 1022 314 w1; 0.24
lef- 1019 366 w1; 0.19
lef 664 510 w1; 0.44
'MESSAGE TEST TEST TEST; 0.42
lef+ 1026 377 w1; 0.45
lef- 1022 446 w1; 0.20
lef+ 1018 450 w1; 0.84
lef- 1017 585 w1; 0.75
lef 483 624 w1


thats my current code
#16
it must be

foreach s sf
,something
,something

but not

foreach s sf
,something
something
#17
Gintaras Wrote:to repeat something, it must be

rep
,something
,something

but not

rep
,something
something

thanks, i will try that
#18
edited
#19
Quote:str s sf.getfile("C:\Documents and Settings\test.txt")
foreach s sf
,spe 10
int w1=act(win("Welcome to your control panel - Windows Internet Explorer" "IEFrame"))
lef 458 491 w1; 1.38
'messaaaaaaage; 0.97
lef+ 1022 314 w1; 0.24
lef- 1019 366 w1; 0.19
lef 664 510 w1; 0.44
'messagggggge; 0.42
lef+ 1026 377 w1; 0.45
lef- 1022 446 w1; 0.20
lef+ 1018 450 w1; 0.84
lef- 1017 585 w1; 0.75
lef 483 624 w1
,
,web s 1

thats my current code, now it only types on the first URL and doesnt continue, it stops from there..
#20
playkid Wrote:
Quote:str s sf.getfile("C:\Documents and Settings\test.txt")
foreach s sf
,spe 10
int w1=act(win("Welcome to your control panel - Windows Internet Explorer" "IEFrame"))
lef 458 491 w1; 1.38
'messaaaaaaage; 0.97
lef+ 1022 314 w1; 0.24
lef- 1019 366 w1; 0.19
lef 664 510 w1; 0.44
'messagggggge; 0.42
lef+ 1026 377 w1; 0.45
lef- 1022 446 w1; 0.20
lef+ 1018 450 w1; 0.84
lef- 1017 585 w1; 0.75
lef 483 624 w1
,
,web s 1

thats my current code, now it only types on the first URL and doesnt continue, it stops from there..


Gintaras gave you the answer a few posts up...

You're trying to run a foreach loop but you don't have the code you want executed each time inside the loop. The only way QMs knows what code is inside a loop is if the code is tab-indented underneath the loop statement.

A loop is a loop in QMs so any statement that repeats or loops works the same. You might want to read Programming in QM and Syntax of QM macro code


Your code should look like this:

Code:
Copy      Help
str s sf.getfile("C:\Documents and Settings\test.txt")
foreach s sf
,spe 10
,int w1=act(win("Welcome to your control panel - Windows Internet Explorer" "IEFrame"))
,lef 458 491 w1; 1.38
,'messaaaaaaage; 0.97
,lef+ 1022 314 w1; 0.24
,lef- 1019 366 w1; 0.19
,lef 664 510 w1; 0.44
,'messagggggge; 0.42
,lef+ 1026 377 w1; 0.45
,lef- 1022 446 w1; 0.20
,lef+ 1018 450 w1; 0.84
,lef- 1017 585 w1; 0.75
,lef 483 624 w1

,web s 1


Copy that then in QMs right click in the code panel and chose Other formats >> Paste escaped. That will keep the tab-indented formatting.

Hope that helps,
TwistMasterDeluxe


Forum Jump:


Users browsing this thread: 1 Guest(s)