1
Scripting Tutorials / Ok, total script noob here
« on: October 13, 2014, 07:28:13 PM »
I am trying to make a basic script. Something simple that will learn me some basics but also do something functional. I am trying to make a script that will organize gold checks/commodity deeds in that nice little fashion where they overlap each other and line up perfectly in a row. This is my very first script. I would appreciate any help someone could give me.
Here is what I have, and please, don't laugh.
gosub selectbag
gosub selectbag2
gosub movedeed
sub selectbag
display ok Click ok and select bag
set #targcurs 1
while #targcurs = 1
wait 2
set %bag #ltargetid
set #ltargetid %bag
event macro 17
Return
sub selectbag2
display ok Click ok and select bag to you want to put deeds in
set #targcurs 1
while #targcurs = 1
wait 2
set %bag2 #lobjectid
set #ltargetid %bag2
event macro 17
Return
sub movedeed
findItem EWH C_, %bag
And thats all I got. I know event macro 17 is last object. I do not know how to make it open the bag that is targeted. If someone could let me know how, after they select the bag, to have the bag open, I would appreciate it. Then if someone could refer to me an example of a click and drag to x,y after I have opened the targeted bag, I would appreciate it. I think contpos puts the gump in a spot of my choosing, then I could click and drag the deeds to the first coordinate, then coordinate +1, or something. Am I on the right tracK? Anything helps. I'm totally new at this but really want to start making my own super secret 1337 scripts that I can brag about and release versions that are just a tease of what my full version, But for now I will be happy organizing checks.
Here is what I have, and please, don't laugh.
gosub selectbag
gosub selectbag2
gosub movedeed
sub selectbag
display ok Click ok and select bag
set #targcurs 1
while #targcurs = 1
wait 2
set %bag #ltargetid
set #ltargetid %bag
event macro 17
Return
sub selectbag2
display ok Click ok and select bag to you want to put deeds in
set #targcurs 1
while #targcurs = 1
wait 2
set %bag2 #lobjectid
set #ltargetid %bag2
event macro 17
Return
sub movedeed
findItem EWH C_, %bag
And thats all I got. I know event macro 17 is last object. I do not know how to make it open the bag that is targeted. If someone could let me know how, after they select the bag, to have the bag open, I would appreciate it. Then if someone could refer to me an example of a click and drag to x,y after I have opened the targeted bag, I would appreciate it. I think contpos puts the gump in a spot of my choosing, then I could click and drag the deeds to the first coordinate, then coordinate +1, or something. Am I on the right tracK? Anything helps. I'm totally new at this but really want to start making my own super secret 1337 scripts that I can brag about and release versions that are just a tease of what my full version, But for now I will be happy organizing checks.