Modify

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#730 closed Bug (Wont Fix)

Application Crash Global as Binary

Reported by: ransombot Owned by:
Milestone: Component: AutoIt
Version: 3.2.12.1 Severity: None
Keywords: Global as Binary Cc:

Description (last modified by Valik)

AppName: autoit3.exe AppVer: 3.2.12.1 ModName: autoit3.exe
ModVer: 3.2.12.1 Offset: 00011c63

Caused by this line in a program I was working on
Global $InCombat as Binary

I'm fairly sure I should be able to call a global and say it's binary, however I could be wrong.. & then it should be labeled a feature request (to lower memory costs) counting pixels (in an obvious bot) is resource costly!!

It may be tied into some other parts of the code for that reason:

#include <GUIConstants.au3> ; enable gui elements like forms buttons and pix
#include "speak.au3" ;  enble speak("text") function 
Opt("SendKeyDelay", 0)
Opt("SendKeyDownDelay", 0) 
Opt("ColorMode", 0)
Global $Paused
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("^s","SetLoc")
HotKeySet("^c","SetCombat")

;HotKeySet("{ESC}", "Quit") ;So we be able to exit from the loop

;setup our locations as globals so we can grab them anywhere & have them the same.
Const $xc as 0
Const $yc as 1
Global $CombatLoc[2] 
$CombatLoc[$xc] = 133
$CombatLoc[$yc]=150

;setup our color swatch for 
Global $CombatColor

;a toggle to see if we are in combat
Global $InCombat as Binary
$InCombat = 0
;$run = 1

;While $run = 1

;WEnd

Func CombatLoop
	While 1
		Sleep(2000)
		;set up a scanner that loops every second could be faster 
		Do		
			ToolTip(PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]),0,0)
			sleep(1000)
			Send("`")
		Until PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]) <> "101010"
		
		; we are in combat so we need to do combat stuff now every second it spams skills
		; since the smallest cool downs are about a second this works grate.
		While PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]) = "101010"
			ToolTip(PixelGetColor(CombatLoc[$xc], $CombatLoc[$yc]),6),0,0)
			sleep(1000)
			Send("15")
		WEnd
		Send("67")
		Sleep(1000)
		send("k")
	WEnd
EndFunc

Func Quit()
    Exit
EndFunc


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
	Speak("I hope you liked the fish!")
    Exit 0
EndFunc

Func SetCombat()
	$InCombat = Binary
EndFunc

PS: it's incomplete & untested was just seeing if some new parts would work... the speach.au3 is my own work just includes the Agent links through AutoIT.. & works fine with other code I have. Also dislexic so sorry for any coding typos or abnormalities.

TY for a grate piece of software.

Attachments (1)

zOMG.idle.au3 (1.7 KB) - added by ransombot 11 years ago.

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by ransombot

comment:1 Changed 11 years ago by Valik

  • Description modified (diff)
  • Milestone 3.2.13.12 deleted
  • Resolution set to Wont Fix
  • Severity changed from Blocking to None
  • Status changed from new to closed

It does not crash in the current beta, it gives an error which is the correct behavior since it is not valid code. I suggest you learn *this* language and don't try to apply conventions from other languages to ours because chances are you just make yourself look foolish.

While on the subject of looking foolish, please learn how to report bugs. You set several fields that are not your place to set. You both attached code and included code inline (without proper tags to mark it as code). And finally the code itself is stupid. You can demonstrate the problem with a single line yet you posted a full script with #include dependencies we can't meet due to missing files.

Anyway, since this doesn't crash in the beta I'm closing it as won't fix.

comment:2 Changed 11 years ago by ransombot

fine won't submit bugs.. if they make me look foolish thank you for your advice

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.