Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Put only part of text recieved into str
#1
Well I have this macro for myspace which will allow me to add my friends without having to wait for their profile to load. Because it takes like 20 seconds or more!, the idea is, when the profile first starts to load my macro gets the text from the URL search bar in the browser , like this.

Code:
Copy      Help
str a.getwintext(id(1001 win("Crazy Browser" "TFrmMain")))
out a

which then brings me this outted URL: http://profile.myspace.com/index.cfm?fu ... =101503640

now, I need it to take that whole gotten text, & put only '=101503640' into another str.

therefore I can do this,

str a.getwintext(id(1001 win("Crazy Browser" "TFrmMain")))
str b=idk yet but it should equal '=101503640'
str c='http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_confirm&statusCD=2&friendID'
str k=b+c
k.setwintext(id(1001 win("Crazy Browser" "TFrmMain")))
then hit the GO button, which will lead me to their add friend page, & skip the profile loading process... PLEASE HELP
#2
Code:
Copy      Help
str a.getwintext(id(1001 win("Crazy Browser" "TFrmMain")))
out a;;http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=1015036
str b=find(a "ID=")
out b;;71, how many characters over what i need in str 'a' is.
lpstr c=a
str d
d.get(c 71)
out d;;ID=101503640 <---the text I needed grabbed from str a
str e="http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_confirm&statusCD=2&friend";; text I need to add to str 'd'
str f
f.from(e d)
out f;;final result='http://friends.myspace.com/index.cfm?fuseaction=invite.addfriend_confirm&statusCD=2&ID=101503640'
f.setwintext(id(1001 win("Crazy Browser" "TFrmMain")))
act id(1001 win("Crazy Browser" "TFrmMain"))
key Y;; pretty much pressing the 'GO' button
#3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I figured it out thanks to some searching on the forums, should have done that in the first place!

well anyways I posted the code for anything somebody might want to grab off of it to use in their own macros, god I love this program, that code right there works exactly how I wanted it to, & very quick!


Forum Jump:


Users browsing this thread: 1 Guest(s)