Sign in to follow this  
Followers 0
Kyme

little simple version for my script

4 posts in this topic

#1 ·  Posted (edited)

i want to make one function to use 10 function first 1 then secount then 3...etc

some like this...but to do the funtion behind $1,$2,$3....$10

$i="$1"
$1="item1()"
$2="item2()"
$3="item3()"
MsgBox(0,"",$i)
$i="$"&$i+2
MsgBox(0,"",$i)
$i="$"&$i+3
MsgBox(0,"",$i)

i hope you get the point....

can someone help me whit this one...

tnx

Regards,Kyme

Edited by Kyme

Share this post


Link to post
Share on other sites



i want to make one function to use 10 function first 1 then secount then 3...etc

some like this...but to do the funtion behind $1,$2,$3....$10

$1="item1()"
$2="item2()"
$3="item3()"
MsgBox(0,"",$i)
$i="$"&$i+2
MsgBox(0,"",$i)
$i="$"&$i+3
MsgBox(0,"",$i)

i hope you get the point....

can someone help me whit this one...

tnx

Regards,Kyme

I don't really get the point, but maybe you want to know the value of a variable which is reperesented by a variable? Have a look at Eval.

You can do things like this

$bike1 = "Norton"
$bn = 1

MsgBox(0,"bike 1 is a ",Eval("bike" & $bn))

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Or Maybe Something Like This O.o?

_All ()

Func _All ()
For $Array = '1' To '5'
Call ('_' & $Array)
Next
EndFunc

Func _1 ()
MsgBox ('0','Notice','This MsgBox Was Called From Function "_1"','0')
EndFunc

Func _2 ()
MsgBox ('0','Notice','This MsgBox Was Called From Function "_2"','0')
EndFunc

Func _3 ()
MsgBox ('0','Notice','This MsgBox Was Called From Function "_3"','0')
EndFunc

Func _4 ()
MsgBox ('0','Notice','This MsgBox Was Called From Function "_4"','0')
EndFunc

Func _5 ()
MsgBox ('0','Notice','This MsgBox Was Called From Function "_5"','0')
EndFunc

Latest Projects :- New & Improved TCP Chat

Share this post


Link to post
Share on other sites

I don't really get the point, but maybe you want to know the value of a variable which is reperesented by a variable? Have a look at Eval.

You can do things like this

$bike1 = "Norton"
$bn = 1

MsgBox(0,"bike 1 is a ",Eval("bike" & $bn))
i don't eplain good:|

i want to make one script to distroy items from inventory, for one game

and i have this x,y's

now what i want to make

some like this:

Func item1()
    Sleep($sleep)
    MouseClick("left",681, 92,1,1);item 1
    Sleep($sleep)
    MouseClick("left",180, 217,1,1);Set item in fuser
    Sleep($sleep)
    MouseClick("left",71, 344,1,1);press fuse button
EndFunc
Func item2()
    Sleep($sleep)
    MouseClick("left",718, 92,1,1);item 2
    Sleep($sleep)
    MouseClick("left",180, 217,1,1);Set item in fuser
    Sleep($sleep)
    MouseClick("left",71, 344,1,1);press fuse button
EndFunc

it's the same x to items 1,5,9,13,15

then same for 2,6,10,14,18

then same for 3,7,11,15,19...etc

and y it's same for 1,2,3,4

then same for 5,6,7,8...etc

now that i want....one function to do some like item1() and item2() but to be shorter in size like mine...

if i made func for all items i will have to big script:| and i think that's will affect the speed and may do bugs:|

MouseClick("left",681, 92,1,1);item 1
    MouseClick("left",718, 92,1,1);item 2
    MouseClick("left",755, 92,1,1);item 3
    MouseClick("left",790, 92,1,1);item 4
    
    MouseClick("left",681,128,1,1);item 5
    MouseClick("left",718, 128,1,1);item 6
    MouseClick("left",755, 128,1,1);item 7
    MouseClick("left",790, 128,1,1);item 8
    
    MouseClick("left",681, 165,1,1);item 9
    MouseClick("left",718, 165,1,1);item 10
    MouseClick("left",755, 165,1,1);item 11
    MouseClick("left",790, 165,1,1);item 12
    
    MouseClick("left",681, 200,1,1);item 13
    MouseClick("left",718, 200,1,1);item 14
    MouseClick("left",755, 200,1,1);item 15
    MouseClick("left",790, 200,1,1);item 16

    MouseClick("left",681, 238,1,1);item 17
    MouseClick("left",718, 238,1,1);item 18
    MouseClick("left",755, 238,1,1);item 19

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0