Sign in to follow this  
Followers 0
Yaan

Variable as mouse click wont work

6 posts in this topic

This is my first autoit script, So im sorry if its really messy.

i want when the user press's L , they can select a 'level' and depending what they type in it changes the mouse click * iv'e allready pre coded the cords of the levels.( named as cord1 and cord2) The problem is it just hasn't worked. Its probbably the way iv'e coded it, Could you guys give me a hand , Thanks.

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
HotKeySet("s", "instances") ;s
HotKeySet("m", "mail")
HotKeySet("l", "setlevel")
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("b", "bag")
Global $Paused
global $cord1
global $cord2
Global $1=186
Global $1a=325
global $2=228
global $2a=360
global $3=179
global $3a=431
global $4=250
global $4a=407
global $5=303
global $5a=337
global $6=313
global $6a=402
global $7=300
global $7a=463
global $8=22
global $8a=477
global $9=187
global $9a=555
global $10=182
global $10a=618
global $11=215
global $11a=611
global $12=233
global $12a=594
global $13=288
global $13a=640
global $14=355
global $14a=666
global $15=290
global $15a=534
global $16=362
global $16a=512
global $17=380
global $17a=450
global $18=360
global $18a=380
global $19=410
global $19a=331
global $20=485
global $20a=325
global $21= 500
global $21a=356
global $22=430
global $22a=392
global $23=481
global $23a=426
global $24=429
global $24a=482
global $25= 415
global $25a=539
global $26=358
global $26a=588
global $27=416
global $27a=646
global $28=476
global $28a=545
global $29=487
global $29a=594
global $30=500
global $30a=662
Global $level
global $loop=1
While $loop=1
sleep(99999999)
WEnd
Func setlevel()
While $level=0
  $level = InputBox("Hello", "Please type in the level of the instance you want to farm, Then Press S when ready")
if $level=1 Then
  if $level=1 then
  $cord1=186 and $cord2=325
  if $level=2 Then
  $cord1=186 and $cord2=325
  if $level=3 Then
  $cord1=$3 and $cord2=$3a
  if $level=4 Then
  $cord1=$4 and $cord2=$4a
  if $level=2 Then
  $cord1=$5 and $cord2=$5a
  if $level=6 Then
  $cord1=$7 and $cord2=$7a
  if $level=8 Then
  $cord1=$8 and $cord2=$8a
  if $level=9 Then
  $cord1=$9 and $cord2=$9a
  if $level=10 Then
  $cord1=$10 and $cord2=$10a
  if $level=11 Then
  $cord1=$11 and $cord2=$11a
  if $level=12 Then
  $cord1=$12 and $cord2=$12a
  if $level=13 Then
  $cord1=$13 and $cord2=$13a
  if $level=14 Then
  $cord1=$14 and $cord2=$14a
  if $level=15 Then
  $cord1=$15 and $cord2=$15a
  if $level=16 Then
  $cord1=$16 and $cord2=$16a
  if $level=17 Then
  $cord1=$17 and $cord2=$17a
  if $level=18 Then
  $cord1=$18 and $cord2=$18a
  if $level=19 Then
  $cord1=$19 and $cord2=$19a
  if $level=20 Then
  $cord1=$20 and $cord2=$20a
  if $level=21 then
  $cord1=$21 and $cord2=$21a
  if $level=22 Then
  $cord1=$22 and $cord2=$22a
  if $level=23 Then
  $cord1=$23 and $cord2=$23a
  if $level=24 Then
  $cord1=$24 and $cord2=$24a
  if $level=25 Then
  $cord1=$25 and $cord2=$25a
  if $level=26 Then
  $cord1=$26 and $cord2=$26a
  if $level=27 Then
  $cord1=$28 and $cord2=$28a
  if $level=29 Then
  $cord1=$29 and $cord2=$29a
  if $level=30 Then
  $cord1=$30 and $cord2=$30a
sleep(9999999999999)
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
WEnd
endfunc

func bag()
local $a = 10
While $a = 10
MouseClick("left",720,795,1,10)
sleep(500)
MouseClick("left",720,757,1,10)
sleep(500)
MouseClick("left",480,580,1,10)
sleep(500)
MouseClick("left",540,615,1,10)
sleep(500)
MouseClick("left",590,423,1,10)
sleep(500)
WEnd
EndFunc
Func instances()
Local $a = 0

  while $a <= 50
sleep(5000)
MouseClick("left",620,800,1,10)
sleep(200)
MouseClick("left",620,700,1,10)
sleep(1000)
MouseClick("left",300,300,1,10)
sleep(500)
MouseClick("left",700,300,1,10)
sleep(1000)
MouseClick("left",446,500,1,10)
sleep(500)
MouseClick("left",445,565,1,10)
sleep(2000)
MouseClick("left",$cord1,$cord2,1,10);intance level
sleep(500)
MouseClick("left",227,358,1,10)
sleep(500)
MouseClick("left",630,338,1,10)
sleep(2000)
MouseClick("left",300,358,1,10)
sleep(500)
MouseClick("left",460,358,1,10)
sleep(200)
MouseClick("left",640,358,1,10)
sleep(500)
MouseClick("left",700,687,1,10)
sleep(1000)
MouseClick("left",650,300,1,10)
sleep(80000)
MouseClick("left",670,690,1,10)
sleep(2000)
$a=$a+1
if $a=2 then mail()
WEnd
endfunc
Func TogglePause()
    $Paused = Not $Paused
    While $Paused
        Sleep(100)
        ToolTip('Script is "Paused"', 0, 0)
    WEnd
endfunc
func mail()
local $b = 0
While $b<=51
MouseClick("left",720,795,1,10)
MouseClick("left",720,733,1,10)
sleep(500)
  MouseClick("left",400,422,1,10)
  sleep(500)
   MouseClick("left",190,646,1,10)
MouseClick("left",177,685,1,10)
MouseClick("left",750,240,1,10)
sleep(700)
$b=$b + 1
if $b=2  then instances()
WEnd
endfunc

Share this post


Link to post
Share on other sites



So the message box pops up asking to type in level , They type in 11. so level changes to 11. the if statemant it says if level= 11 then cord1 and cord 2 changes . But when i excute func 'instances' it doesnt change.

Share this post


Link to post
Share on other sites

What a pity, not only did you bump your post within a 24 hour period but you failed to read the forum rules.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

What a pity, not only did you bump your post within a 24 hour period but you failed to read the forum rules.

I didn't mean to spam , I just thought i'd give more info.

This isnt for automating a game, Its for automating an anti virus. Come on man , Iv'e got stuck and i need some help.

Share this post


Link to post
Share on other sites

Hi, Yaan. Perhaps you could give us some more information. What AV client is this for? It is a bit difficult to NOT think it is about game automation when we see lines like this, so the more info you provide the better we can assist :)

$level = InputBox("Hello", "Please type in the level of the instance you want to farm, Then Press S when ready")


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I didn't mean to spam , I just thought i'd give more info.

This isnt for automating a game, Its for automating an anti virus. Come on man , Iv'e got stuck and i need some help.

This made the Bullshit alarm go off.

Click


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0