Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Yahoo Contact List Text
#1
Hi - QM n00b here Big Grin

I have created a text input, and I want the person to input the name of a contact on their Yahoo (or MSN) contact list. This will then open up an Instant message, etc etc. I have yet to be able to get a handle on a list item to double click it, but I can do everything else.

Here is what I have so far:

Code:
Copy      Help
run "C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe" "" "" "C:\Program Files\Yahoo!\Messenger"
double F=1.0; spe 10
int w1=act(win("Yahoo! Messenger with Voice (BETA)" "YahooBuddyMain"))
str r
str p = " - Instant Message"
inp r "yahoo ID"
p - r
dou 90 237 w1
Acc a=acc(r "LISTITEM" w1 "SysListView32" "" 0x1405)
str s=a.Description
out s    
int w2=act(win(p "YSearchMenuWndClass"))
key Cg
key "goodbye, thank you."
key Y
clo w2

Obviously this wont work, but I want String r to be the contact name so I can double click (or fire the event) so it opens up the IM window. At the moment, I have manually entered the co-ordinates for the mouse, in the
Code:
Copy      Help
dou 90 237 w1
line. This I want replaced with the Acc lines to get it automatically.

Any help will be VERY appreciated.

Many thanks,

Matt H

PS - Just tried doing the following:

Code:
Copy      Help
    Acc b=acc("Doc1.doc" "LISTITEM" "My Documents" "SysListView32" "" 0x1405)
    str z=b.Description
    out z    
    Acc a=acc("*" "LISTITEM" w1 "SysListView32" "" 0x1001)
    str s=a.Description
    out s
and both strings, z & s have nothing in them.
#2
Code:
Copy      Help
int w1=act(win("Yahoo! Messenger" "YahooBuddyMain"))
str r
inp- r
Acc a=acc(r "LISTITEM" w1 "SysListView32" "" 0x1001)
a.Mouse(4)
#3
Hi,

That's great - thank you very much!

Now I have a different question - what is the function I can use to select all elements in a list?
Do I have to navigate to each object and do a right mouse click while holding shift?

Many thanks,

Matt
#4
Code:
Copy      Help
act "Form"
Acc a=acc("" "LIST" win("Form" "#32770") "ListBox" "" 0x1000)
Acc afirst alast
a.Navigate("first" afirst)
a.Navigate("last" alast)
afirst.Select(3)
alast.Select(4)

dialog Dialog13 for testing
Code:
Copy      Help
\Dialog_Editor

str controls = "3"
str lb3
lb3="a[]b[]c"
if(!ShowDialog("Dialog13" 0 &controls)) ret

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 222 134 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ListBox 0x54130309 0x200 4 4 96 48 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010900 "" ""
#5
Hi - OK I have the following code:

Code:
Copy      Help
run "C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe" "" "" "C:\Program Files\Yahoo!\Messenger"
double F=1.0; spe 10
int w1=act(win("Yahoo! Messenger with Voice (BETA)" "YahooBuddyMain"))
str r
inp r "Message To Send"
Acc a=acc("" "LISTITEM" w1 "SysListView32" "" 0x1001)

Acc afirst alast
a.Navigate("first" afirst)
a.Navigate("last" alast)
afirst.Select(3)
alast.Select(4)

But QM says:

Quote:Error (RT) in MyMacro: failed

and the cursor points at the a.Navigate("first" afirst) line.

Any suggestions? Am I supposed to fill it in some other way?

Cheers,

Matt
#6
acc finds some other listview control. Use id.

Code:
Copy      Help
;run "C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe" "" "" "C:\Program Files\Yahoo!\Messenger"
int w1=act(win("Yahoo! Messenger" "YahooBuddyMain"))
Acc a=acc("" "LISTITEM" w1 "id=101 SysListView32" "" 0x1001)
;out a.Name
Acc alast
a.Navigate("parent last" alast)
a.Select(2)
alast.Select(4)
#7
Hooray!!!

Many, many thanks Gintaras - you are a Quick Macros King and Wonderful Helper of n00bs!

Big Grin Big Grin Big Grin Big Grin


Forum Jump:


Users browsing this thread: 1 Guest(s)