Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › MultiPlayer Game Hacks & Cheats › Realm of the Mad God Hacks & Cheats › Realm of the Mad God Tutorials & Source Code › Game Starter AHK Script

TalkingGame Starter AHK Script

Posts 1–10 of 10 · Page 1 of 1
GT
gtaking
Game Starter AHK Script
(Some might say tutorial, some might say commentary. The part where i explain the script line by line can be opened in text to speech software where script is opened in another window autoscrolling with constant speed to make this experience more look like Star Wars opening screen :D)

(Programmers can just read Usageand Files sections then jump to The Code to see the whole script)




(This is a photoshopped image, actual product may differ :P)


The problem is: How to start the game using the simplest way?

I worked on this maybe more than i should, so i've gathered up many useful tricks for common desktop usage.

After seeing new players asking these same questions all over the forum, decided sharing - on this hacking forum without shame. (Trusting my script's hacking power and 100% success on hacking window menus of course :P )

There are many ways to do this, but the best answer I've come across is (and always will be?) around .ahk scripts. I preferred doing this job with a single ahk script file, and inside the file with the simplest function calls; but hacker's life is always hard :P (mostly because of windows fuctions, we know you are trying your best for us, ahk <3 ).

(e.g ahk run command is limited. you can't easily set priority. or if you try to open a file with an exe, giving two paths, you cant add parameters. you have to find workarounds for each task. but all of them were taking only one line of code in a .bat file. setting program icon was hard, too. a couple of clicks on right click file settings would solve it forever, though. Starting desired window directly in given coordinates would really add some elegance, but it has'nt been implemented anywhere yet. I've come across a solution including running from within cmd, then saving window starting position indefinitely. as i said from the start i only prefer portable, definite solutions.)


Code:
; one line command of .bat file
; still the best
start "Realm of the Mad God" /abovenormal "C:\---\Desktop\Realm of the Mad God\flashplayer_11_sa.exe" "C:\---\Desktop\Realm of the Mad God\client.swf"

Usage

The script works in administrator mode (for setting process priority, etc...)
The script is for 1366 x 768, if you dont like window arrangement, you have to change coordinates manually (like everything else which i'll explain in the next section)
When you close the game window, script closes

This is my beginner level contribution for all the RotMG fans out there.


Files

Years ago I had a desktop shortcut (with changed icon and administrative mode setting), opening AHK exe, created from AHK script, opening shortcut (with preferences changed to start minimized and smallest cmd window size), to .bat file, that opens .swf client in standalone .exe.

That was too much of a hassle.

Now we will create a desktop shortcut (with changed icon), opening AHK script, that opens .swf client in standalone .exe.

The files we will have will be:

Code:
; desktop shortcut
Realm of the Mad God.lnk
; game directory
flashplayer_--_standalone.exe
client.swf
our script.ahk

Running the Script for Beginners

Here's what you have to do:

- find a flash player projector standalone .exe, find a client .swf
- create a new .txt document, paste the script inside, change its filename extension to .ahk
- create shortcut in desktop to .ahk you just created
- change shortcut's icon from properties
- install autohotkey
- change .ahk's content as you like, but first change filenames and filepaths
- start the game by opening the shortcut


Content

We may go step by step to create the best ever script that answers all our needs.

We don't want any logged keys or any wait before gui / window functions.
 
Spoiler
Code:
#NoEnv
#SingleInstance, Force
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input


Script has a GUI so it will be active all the time game is running. We shouldnt omit tray icon, there should be an icon so that we should be sure of whether the script is working or closed. There is no charm in default ahk script icon and also we dont want to see it change when the script is working, so we should set the script tray icon right away.

Code:
Menu, Tray, Icon, Shell32.dll, 35
It should be running on administrator mode for the features we want. Since we didnt bother ourselves for shortcut admin preferences, script will run twice, first one being the non administrator mode.

 
Spoiler
Code:
IF NOT A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"
   ExitApp
}


If your standalone filename is different, you should only change here from whole script. I've always liked v11.5's performance, now there are so many versions, we need a performance comparison or lite versions of Adobe Flash Player projector

Code:
standalone = flashplayer_23_sa.exe
We can create a black background, we can do everything. If we are able to, why bother having to watch dirty windows desktop anymore :) Just keep in mind that you may not like given coordinates in bigger screens. When you see basic coordinate functions like GUI or WinMove for game window or top black gui, you can change their starting position x & y to suit your needs.

 
Spoiler
Code:
Gui, New, +HwndBlackBack +Disabled -Caption -SysMenu -Theme +ToolWindow
Gui, %BlackBack%: Color, black
Gui, %BlackBack%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NoActivate


You have to change client name here, also. You can add another var under standalone for symmetry but in any case you have to decide path.

Code:
Run, "C:\---\Desktop\Realm of the Mad God\%standalone%" "C:\---\Desktop\Realm of the Mad God\originalclientfrommpgh.swf"
Now we can start our game at last. You may change WinMove coordinates here. If Windows manages to copy unix and some crazy things happen, in future ahk versions we may see windows opening in given coordinates right off the bat. These are the magic code lines which kills the menu and title bar of standalone.

 
Spoiler
Code:
WinWaitActive, ahk_exe %standalone%
WinSetTitle, Realm of the Mad God


Code:
WinSet, Style, -0xC00000, ahk_exe %standalone% 
DllCall("SetMenu", uint, WinActive( "A" ), uint, 0)

WinMove, ahk_exe %standalone%, , 304, 67
Now the pain part. I might have used more than i should to those stupid 5 line codes. Just remember kids: Windows = bad design.
(Hey, the great Windows allowed us to modify its holy icons. Isn't just that, enough? Just be thankful and praise your lord!)

1. you can either get icon from dll (i chose the blank icon from the list),

Code:
Iconfile := "C:\Windows\System32\shell32.dll"
hMod := DllCall( "GetModuleHandle", str, Iconfile , ptr )
hIcon := DllCall( "LoadImage", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_BIG
2. or from your steam exe (i prefer this for portability and simplicity),

Code:
Iconfile := "D:\---\SteamApps\common\Realm of the Mad God\Realm of the Mad God.exe"
DllCall("shell32\ExtractIconEx" (A_IsUnicode ? "W":"A"), ptr, &Iconfile, int, 0, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint) 
SendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%  	    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%	  	    ; WM_SETICON, ICON_BIG
3. or from a cursor/icon/bmp file (which was too similar to my old solution, requiring a generated ico)

Code:
Iconfile := "D:\---\SteamApps\common\Realm of the Mad God\icons\a.ico"
hIcon := DllCall( "LoadImage", uint, 0, str, Iconfile , uint, 1, int, 0, int, 0, uint, 0x10, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_BIG
When the game window is larger, login button cannot fit in the screen. For anti theft purposes i prefer my password to be forgotten by flash player. So i use clicker to login for me. You may choose to delete relevant lines to open the game in large window directly. You have to change top black gui spawn coordinates too, then.

 
Spoiler
Code:
Gui, New, +HwndBlackTop +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop
Gui, %BlackTop%: Color, black
Gui, %BlackTop%: Show, x304 y67 w960 h6 NoActivate


This is the only easy way i've found to change game priority. Didn't want to make all these jobs scattered around into different lines. If you would like, you may change this to abovenormal, high... etc. Very high priorities are known to cause risks and it's been discussed in the forum and everywhere else. I didn't change that line to nonrisky one in given code because i'm already using more resources with my guis and script than normal running, this script is for beauty and ease of use.

Code:
Process, Priority, %standalone%, realtime
 
Spoiler
Code:
WinActivate, ahk_exe %standalone%


When everything is ready, we wait for the game to open. I'm not a script kid, i did use Sleep, 3000 for a long time for waiting :D . Now it looks to some pixel whether the screen is changed from black to something. It can also be used for Register button: after the game has opened, only if it's there, clicker should work (if you've opened the game but didnt nexus, password protector doesn't need to do anything to delete login data as everybody knows).

If you change opening screen to bigger one, you have to change all the coordinates here too. I said beginner level script so i should state these things. You also should enter your password and email into script. The script will be open in a seperate process so as far as i know, unless you open hacking exe's targeting open ahk scripts yourself while playing (im gonna open dat suspiciously looking exe just before playing RotMG, my best game - who does that?), you are safe.

 
Spoiler
Code:
Sleep, 600
Click 770, 40
Sleep, 300
Click 350, 275
Sleep, 300
Send, YOUR_EMAIL
Sleep, 300
Click 350, 365
Sleep, 300
Send, YOUR_PASSWORD
Sleep, 300
Click 495, 465
Sleep, 1200


Its kinda sad that winmove functions require so much time that sometimes you see its moving (real reason we need StartAtCoordinates function). For this reason, we have to move black top gui before maximizing game window :P

 
Spoiler
Code:
WinMove, ahk_id %BlackTop%, , 225, 0
WinMove, ahk_exe %standalone%, , 225, 0, 960, 734


After login, script just looks whether the game window still exists. If game window cannot be found, script closes itself.

 
Spoiler
Code:
SetTimer, Ending, 1200

Return


Ending:
IfWinNotExist, ahk_exe %standalone%
    ExitApp

Return



Bonus: If the game window is active, buttons may be mapped to different ones. Flash doesn't listen anything else other than hardware itself, somehow. So this feature, working anywhere else, doesn't work for RotMG. I added anyway so maybe some people work on it.

Code:
#If WinActive(ahk_exe standalone)
XButton1::1
XButton2::2

Return
The Script

Code:
#NoEnv
#SingleInstance, Force
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input


Menu, Tray, Icon, Shell32.dll, 35


IF NOT A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"
   ExitApp
}


standalone = flashplayer_23_sa.exe


Gui, New, +HwndBlackBack +Disabled -Caption -SysMenu -Theme +ToolWindow
Gui, %BlackBack%: Color, black
Gui, %BlackBack%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NoActivate


Run, "C:\---\Desktop\Realm of the Mad God\%standalone%" "C:\---\Desktop\Realm of the Mad God\client.swf"


WinWaitActive, ahk_exe %standalone%
WinSetTitle, Realm of the Mad God

WinSet, Style, -0xC00000, ahk_exe %standalone% 
DllCall("SetMenu", uint, WinActive( "A" ), uint, 0)

WinMove, ahk_exe %standalone%, , 304, 67

/*
Iconfile := "C:\Windows\System32\shell32.dll"
hMod := DllCall( "GetModuleHandle", str, Iconfile , ptr )
hIcon := DllCall( "LoadImage", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_BIG
*/
Iconfile := "D:\---\SteamApps\common\Realm of the Mad God\Realm of the Mad God.exe"
DllCall("shell32\ExtractIconEx" (A_IsUnicode ? "W":"A"), ptr, &Iconfile, int, 0, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint) 
SendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%  	    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%	  	    ; WM_SETICON, ICON_BIG
/*
Iconfile := "D:\---\SteamApps\common\Realm of the Mad God\icons\a.ico"
hIcon := DllCall( "LoadImage", uint, 0, str, Iconfile , uint, 1, int, 0, int, 0, uint, 0x10, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_SMALL
SendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%  		    ; WM_SETICON, ICON_BIG
*/

Gui, New, +HwndBlackTop +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop
Gui, %BlackTop%: Color, black
Gui, %BlackTop%: Show, x304 y67 w960 h6 NoActivate

Process, Priority, %standalone%, realtime
WinActivate, ahk_exe %standalone%


Loop {						
	Sleep, 600
	PixelGetColor, color, 760, 200
	if (color != 0x000000)
		Break
}

Sleep, 600
Click 770, 40
Sleep, 300
Click 350, 275
Sleep, 300
Send, YOUR_EMAIL
Sleep, 300
Click 350, 365
Sleep, 300
Send, YOUR_PASSWORD
Sleep, 300
Click 495, 465
Sleep, 1200


WinMove, ahk_id %BlackTop%, , 225, 0
WinMove, ahk_exe %standalone%, , 225, 0, 960, 734


SetTimer, Ending, 1200

Return


Ending:
IfWinNotExist, ahk_exe %standalone%
    ExitApp

Return

/*
#If WinActive(ahk_exe standalone)
XButton1::1
XButton2::2

Return
*/
#1 · 10y ago
PI
PimpOrPosh
TL;DR why do you need a script that runs the game, just open the client?
#2 · 10y ago
GT
gtaking
hah, you mean .bat file? maybe.

every single time for years? no.

it looks more official this way. and classy. and awesome. and...
#3 · 10y ago
RI
Riigged
this thread looked like it took a lot of work to format for something that nobody is probably gonna use, soz.
#4 · 10y ago
GT
gtaking
RotMG Starter
Release - RotMG Starter Script Creator

Helper GUI for Game Starter AHK Script.
Just drag & drop related files to create Realm of the Mad God shortcut to your desktop.






What It Does

It creates a RotMG Starter AHK script to the given flash projector's path,
It creates a game shortcut to desktop, which opens the script that has just been created.
Created script will be able to open the given client in the given projector with the given icon.


Usage

Script can create a script which can load icons from given formats to both shortcut icon and the game window.
If a dll is used for icon, 1st icon will be loaded. (for other icons within dll, exact icon index should manually be entered into DllCall LoadImage function)
If swf icon system file cannot be found, just press ok, ehe :D (its just for making gui prettier)
For auto-login, password info should manually be entered into the created ahk file code. (i didn't make text input for that since no one would want to write their pass in a gui anyway)


Requirements for Beginners

Here's what you need:

- find a flash player projector standalone .exe, find a client .swf
- find the game's .ico or use steam .exe from the game directory
- install autohotkey
- change shortcut's target .ahk's EMAIL and PASS to yours for it to auto-login for you
- start the game by opening the shortcut


The Code

Code:
#NoEnv
#Warn
#SingleInstance, Force
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
SetWorkingDir %A_ScriptDir%


Menu, Tray, Icon, Shell32.dll, 50


mainstate := 0

flashIconPath := "C:\Windows\SysWOW64\Macromed\Flash\FlashPlayerPlugin*.exe"

exePath =
swfPath =
iconPath =
exeOK := false
swfOK := false
iconOK := false


Gui, New, +HwndDragWindow +AlwaysOnTop
Gui, %DragWindow%: Color, black
Gui, %DragWindow%: Show, x100 y100 w500 h375


Gui, New, +HwndAAA +Parent%DragWindow% +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop
Gui, %AAA%: +0x40000000 -0x80000000
Gui, %AAA%: Font, s12 cWhite, Terminal
Gui, %AAA%: Add, Text, x219 y150 w500 h30, RotMG
Gui, %AAA%: Font, s10 cWhite, Terminal
Gui, %AAA%: Add, Text, x221 y174 w500 h30, Starter
Gui, %AAA%: Color, black
Gui, %AAA%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NoActivate


Sleep, 2000
Gui, %AAA%: Destroy
mainstate := 1


Gui, %DragWindow%: Font, s11 cWhite, Terminal

; standalone and client boxes
Gui, %DragWindow%: Add, Text, x92 y124 w175 h13, flash projector
Gui, %DragWindow%: Add, Text, x136 y96 w36 h12 hwndExt1, exe
Control, Hide, , , ahk_id %Ext1%
Gui, %DragWindow%: Add, Text, x118  y98  w6   h12  0x6	 hwndCol11
Gui, %DragWindow%: Add, Text, x176  y98  w6   h12  0x6   hwndCol12
Gui, %DragWindow%: Add, Text, x118  y110 w64  h6   0x6   hwndTop1
Gui, %DragWindow%: Add, Text, x118  y98  w64  h6   0x6   hwndBar1

Gui, %DragWindow%: Add, Text, x308 y124 w175 h13, game client
Gui, %DragWindow%: Add, Text, x338 y96 w36 h13 hwndExt2, swf
Control, Hide, , , ahk_id %Ext2%
Gui, %DragWindow%: Add, Text, x318  y98  w6   h12  0x6	 hwndCol21
Gui, %DragWindow%: Add, Text, x376  y98  w6   h12  0x6	 hwndCol22
Gui, %DragWindow%: Add, Text, x318  y110 w64  h6   0x6	 hwndTop2
Gui, %DragWindow%: Add, Text, x318  y98  w64  h6   0x6   hwndBar2

; icon box
Gui, %DragWindow%: Add, Text, x215 y180 w175 h12, icon file
Gui, %DragWindow%: Add, Text, x238 y210 w36 h49 hwndExt3, ico`nswf`nexe`ndll
Control, Hide, , , ahk_id %Ext3%
Gui, %DragWindow%: Add, Text, x218  y208  w6   h6   0x6  hwndCol31
Gui, %DragWindow%: Add, Text, x276  y208  w6   h6   0x6  hwndCol32
Gui, %DragWindow%: Add, Text, x218  y202  w64  h6   0x6	 hwndTop3
Gui, %DragWindow%: Add, Text, x218  y214  w64  h6   0x6  hwndBar3


Gui, %DragWindow%: Add, Text, x213 y312 w80 h12 hwndTxt0, Drag Files


Iconfile := "C:\Windows\System32\shell32.dll"
hMod := DllCall( "GetModuleHandle", str, Iconfile , ptr )
hIcon := DllCall( "LoadImage", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_id %DragWindow%
SendMessage, 0x80, 1, hIcon, , ahk_id %DragWindow%


SetTimer, Blink, 150
bcounter := 0

Return


GuiDropFiles:
WinActivate, ahk_id %DragWindow%
if (mainstate == 0)
	Return
Loop, parse, A_GuiEvent, `n
{
    	SplitPath, A_LoopField, name, dir, ext

	if (not iconOK and A_GuiX > 215 and A_GuiX < 290 and A_GuiY > 220 and A_GuiY < 295) {

		iconPath = %A_LoopField%
		if (ext == "dll") {
			iconType := 0
			Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans Icon1, %iconPath%
		}
		else if (ext == "exe") {
			iconType := 1
			Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans, %iconPath%
		}
		else if (ext == "ico") {
			iconType := 2
			Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans, %iconPath%
		}
		else if (ext == "swf") {
			iconType := 3
			Loop, Files, %flashIconPath%
			{
				swfIcon = %A_LoopFileFullPath%
				Break
			}
			Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans Icon6, %swfIcon%
		}
		else {
			Return
		}
		Gui, %DragWindow%: Color, black
		iconOK := true
		Control, Hide, , , ahk_id %Col31%
		Control, Hide, , , ahk_id %Col32%
		Control, Hide, , , ahk_id %Top3%
		Control, Hide, , , ahk_id %Bar3%
		if (mainstate == 2) {
			ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
			ControlSetText, , Create Script, ahk_id %Txt0%
		}
	}
	else if (not exeOK and ext == "exe") {

		exePath = %A_LoopField%
		Gui, %DragWindow%: Add, Picture, x118 y52 w64 h64 AltSubmit +BackgroundTrans, %exePath%
		Gui, %DragWindow%: Color, black
		exeOK := true
		Control, Hide, , , ahk_id %Col11%
		Control, Hide, , , ahk_id %Col12%
		Control, Hide, , , ahk_id %Top1%
		Control, Hide, , , ahk_id %Bar1%
		if (swfOK) {
			mainstate := 2
			if (iconOK) {
				ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
				ControlSetText, , Create Script, ahk_id %Txt0%
			}
			else {
				ControlMove, , 166, 338, 180, 12, ahk_id %Txt0%
				ControlSetText, , Create Iconless Script, ahk_id %Txt0%

			}
		}
	}
	else if (not swfOK and ext == "swf") {

		swfPath = %A_LoopField%
		Loop, Files, %flashIconPath%
		{
			swfIcon = %A_LoopFileFullPath%
			Break
		}
		Gui, %DragWindow%: Add, Picture, x318 y52 w64 h64 AltSubmit +BackgroundTrans Icon6, %swfIcon%
		Gui, %DragWindow%: Color, black
		swfOK := true
		Control, Hide, , , ahk_id %Col21%
		Control, Hide, , , ahk_id %Col22%
		Control, Hide, , , ahk_id %Top2%
		Control, Hide, , , ahk_id %Bar2%
		if (exeOK) {
			mainstate := 2
			if (iconOK) {
				ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
				ControlSetText, , Create Script, ahk_id %Txt0%
			}
			else {
				ControlMove, , 166, 338, 180, 12, ahk_id %Txt0%
				ControlSetText, , Create Iconless Script, ahk_id %Txt0%
			}
		}
	}
}
Return


~LButton::
	MouseGetPos, mouseX, mouseY, id
	WinGetClass, class, ahk_id %id%

	if (class = "AutoHotkeyGUI") {
		if (mouseY < 25 and mouseX < 460) {
			Loop {	; now theres tilde, no need
				Sleep, 10
   				GetKeyState, state, LButton, P
   				if state = U
    		    			Break
			}
		}
		else if (mainstate == 2 and mouseY > 325 and mouseY < 355 and mousex > 155 and mousex < 355) { ; create script

			ControlMove, , 120, 338, 290, 12, ahk_id %Txt0%
			ControlSetText, , desktop shortcut, ahk_id %Txt0%

			SplitPath, exePath, name, dir
			ahkfilePath = %dir%\Realm of the Mad God.ahk
			ahkfile := FileOpen(ahkfilePath, "w")

			ahkfileinput := "#NoEnv`r`n#SingleInstance, Force`r`n#KeyHistory 0`r`nListLines Off`r`nSetBatchLines, -1`r`nSetKeyDelay, -1, -1`r`nSetMouseDelay, -1`r`nSetDefaultMouseSpeed, 0`r`nSetWinDelay, -1`r`nSetControlDelay, -1`r`nSendMode Input`r`n`r`n`r`nMenu, Tray, Icon, Shell32.dll, 35`r`n`r`n`r`nIF NOT A_IsAdmin`r`n{`r`n`tRun *RunAs ""%A_ScriptFullPath%""`r`n`tExitApp`r`n}`r`n`r`n`r`nstandalone = " name "`r`n`r`n`r`nGui, New, +HwndBlackBack +Disabled -Caption -SysMenu -Theme +ToolWindow`r`nGui, %BlackBack%: Color, black`r`nGui, %BlackBack%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NoActivate`r`n`r`n`r`nRun, """ dir "\%standalone%"" """ swfPath """`r`n`r`n`r`nWinWaitActive, ahk_exe %standalone%`r`nWinSetTitle, Realm of the Mad God`r`n`r`nWinSet, Style, -0xC00000, ahk_exe %standalone%`r`nDllCall(""SetMenu"", uint, WinActive( ""A"" ), uint, 0)`r`n`r`n`r`n"
			ahkfile.Write(ahkfileinput)
			if (not iconOK) { 		; dll
				ahkfileinput := "Iconfile := ""C:\Windows\System32\shell32.dll""`r`nhMod := DllCall( ""GetModuleHandle"", str, Iconfile , ptr )`r`nhIcon := DllCall( ""LoadImage"", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )`r`nSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_SMALL`r`nSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_BIG`r`n"
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, C:\Windows\System32\shell32.dll, , 50, 7
			}
			else if (iconType == 0)		; dll
				ahkfileinput := "Iconfile := """ iconPath """`r`nhMod := DllCall( ""GetModuleHandle"", str, Iconfile , ptr )`r`nhIcon := DllCall( ""LoadImage"", ptr, hMod, uint, 1, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )`r`nSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_SMALL`r`nSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_BIG`r`n"
			else if (iconType == 1)		; exe
				ahkfileinput := "Iconfile := """ iconPath """`r`nDllCall(""shell32\ExtractIconEx"" (A_IsUnicode ? ""W"":""A""), ptr, &Iconfile, int, 0, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint)`r`nSendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%`t`t; WM_SETICON, ICON_SMALL`r`nSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_BIG`r`n"
			else if (iconType == 2)		; ico
				ahkfileinput := "Iconfile := """ iconPath """`r`nhIcon := DllCall( ""LoadImage"", uint, 0, str, Iconfile , uint, 1, int, 0, int, 0, uint, 0x10, ptr )`r`nSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_SMALL`r`nSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_BIG`r`n"
			else if (iconType == 3)	{	; swf
				ahkfileinput := "Iconfile := """ swfIcon """`r`nDllCall(""shell32\ExtractIconEx"" (A_IsUnicode ? ""W"":""A""), ptr, &Iconfile, int, 5, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint)`r`nSendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%`t`t; WM_SETICON, ICON_SMALL`r`nSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t; WM_SETICON, ICON_BIG`r`n"
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, %swfIcon%, , 6, 7
			}
			if (iconOK and iconType != 3)
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, %iconPath%, , 1, 7

			ahkfile.Write(ahkfileinput)
			ahkfileinput := "`r`n`r`nWinMove, ahk_exe %standalone%, , 304, 67`r`n`r`n`r`nGui, New, +HwndBlackTop +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`nGui, %BlackTop%: Color, black`r`nGui, %BlackTop%: Show, x304 y67 w960 h6 NoActivate`r`n`r`nProcess, Priority, %standalone%, realtime`r`nWinActivate, ahk_exe %standalone%`r`n`r`n`r`nLoop {`r`n`tSleep, 600`r`n`tPixelGetColor, color1, 625, 160`r`n`tif (color1 != 0x000000)`r`n`t`tBreak`r`n}`r`n`r`nPixelGetColor, color1, 683, 41`r`nPixelGetColor, color2, 708, 41`r`nif (color1 == 0xFFFFFF and color2 == 0xFFFFFF) {`r`n`tSleep, 600`r`n`tClick 770, 40`r`n`tSleep, 300`r`n`tClick 350, 275`r`n`tSleep, 300`r`n`tSend, YOUR_EMAIL`r`n`tSleep, 300`r`n`tClick 350, 365`r`n`tSleep, 300`r`n`tSend, YOUR_PASSWORD`r`n`tSleep, 300`r`n`tClick 495, 465`r`n`tSleep, 1200`r`n}`r`n`r`nWinMove, ahk_id %BlackTop%, , 225, 0`r`nWinMove, ahk_exe %standalone%, , 225, 0, 960, 734`r`n`r`n`r`nSetTimer, Ending, 1200`r`n`r`nReturn`r`n`r`n`r`nEnding:`r`nIfWinNotExist, ahk_exe %standalone%`r`n`tExitApp`r`n`r`nReturn`r`n`r`n/*`r`n#If WinActive(ahk_exe standalone)`r`nXButton1::1`r`nXButton2::2`r`n`r`nReturn`r`n*/`r`n"
			ahkfile.Write(ahkfileinput)
			ahkfile.Close()

			ControlSetText, , desktop shortcut has been created..., ahk_id %Txt0%
		}
		Return
	}
	else if (class = "Shell_TrayWnd") {
		Return	; now theres tilde, no need to block
	}
	else  {
		if (mainstate == 2 and not iconOK) { ; repeated code
			Sleep, 500
			Control, Show, , , ahk_id %Ext3%
			Loop {
    				Sleep, 10
   				GetKeyState, state, LButton, P
   				if (state == "U")
				{
					ControlMove, , , , , 1, ahk_id %Ext3%
					Control, Hide, , , ahk_id %Ext3%
					ControlMove, , , 240, , , ahk_id %Bar3%
					ControlMove, , , , , 6, ahk_id %Col31%
					ControlMove, , , , , 6, ahk_id %Col32%
    		    			Break
				}
				ControlGetPos, , z, , , , ahk_id %Bar3%
				if (z < 285) {
					a := (292-z)>>3
					z := z+a
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , z-236, ahk_id %Ext3%
					ControlMove, , , , , z-232, ahk_id %Col31%
					ControlMove, , , , , z-232, ahk_id %Col32%
				}
				else if (z == 286) {
				}
				else {
					z := 286
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , 49, ahk_id %Ext3%
				}
			}
			Return
		}
		else if (mainstate != 1)
			Return

		Sleep, 500

		Control, Show, , , ahk_id %Ext1%
		Control, Show, , , ahk_id %Ext2%
		Control, Show, , , ahk_id %Ext3%

		if (mainstate == 1) {
			ControlMove, , 175, 338, 180, 12, ahk_id %Txt0%
			ControlSetText, , Drop into the Window, ahk_id %Txt0%
		}

		Loop {
    			Sleep, 10
   			GetKeyState, state, LButton, P
   			if (state == "U")
			{
				ControlMove, , , , , 1, ahk_id %Ext3%
				Control, Hide, , , ahk_id %Ext1%
				Control, Hide, , , ahk_id %Ext2%
				Control, Hide, , , ahk_id %Ext3%

				ControlMove, , , 124, , , ahk_id %Bar1%
				ControlMove, , , 124, , , ahk_id %Bar2%
				ControlMove, , , 240, , , ahk_id %Bar3%
				ControlMove, , , 130, , 6, ahk_id %Col11%
				ControlMove, , , 130, , 6, ahk_id %Col12%
				ControlMove, , , 130, , 6, ahk_id %Col21%
				ControlMove, , , 130, , 6, ahk_id %Col22%
				ControlMove, , , , , 6, ahk_id %Col31%
				ControlMove, , , , , 6, ahk_id %Col32%

				if (mainstate == 1) {
					ControlMove, , 216, 338, 80, 12, ahk_id %Txt0%
					ControlSetText, , Drag Files, ahk_id %Txt0%
				}
    		    		Break
			}
			if (1) { ; one of them might be hidden but will still move
				ControlGetPos, , y, , , , ahk_id %Bar1%
				if (y > 114) {
					a := (114-y)>>5
					y := y+a
					ControlMove, , , y, , , ahk_id %Bar1%
					ControlMove, , , y, , , ahk_id %Bar2%
					a := y+6
					b := 131-y
					ControlMove, , , a, , b, ahk_id %Col11%
					ControlMove, , , a, , b, ahk_id %Col12%
					ControlMove, , , a, , b, ahk_id %Col21%
					ControlMove, , , a, , b, ahk_id %Col22%
				}
				else if (y == 114) {
				}
				else {
					y := 114
					ControlMove, , , , , 13, ahk_id %Ext1%
					ControlMove, , , , , 13, ahk_id %Ext2%
					ControlMove, , , y, , , ahk_id %Bar1%
					ControlMove, , , y, , , ahk_id %Bar2%
				}
			}
			if (not iconOK) { ; repeated code
				ControlGetPos, , z, , , , ahk_id %Bar3%
				if (z < 285) {
					a := (292-z)>>3
					z := z+a
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , z-236, ahk_id %Ext3%
					ControlMove, , , , , z-232, ahk_id %Col31%
					ControlMove, , , , , z-232, ahk_id %Col32%
				}
				else if (z == 286) {
				}
				else {
					z := 286
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , 49, ahk_id %Ext3%
				}
			}
		}
	}
Return


GuiClose:
ExitApp


Blink:
if (bcounter = 19) {
	Control, Hide, , , ahk_id %Txt0%
	bcounter := 0
}
else if (bcounter = 0) {
	Control, Show, , , ahk_id %Txt0%
	bcounter++
}
else
	bcounter++
Return


Esc::
ExitApp
#5 · 9y ago
BL
bluuman
interesting, you put a lot of work into this
#6 · 9y ago
GT
gtaking
RotMG Starter v.4
Up to Date - RotMG Starter Script Creator

You know all these years doesn't change one thing:





RotMG Starter v.4

It is enhanced, it is faster, it is stronger!


Features

- (optional) black alwaysontop frame that hides window frames
- (optional) tray menu allows black background toggle
- clicking top right of black background shows all buttons (1 atm)
- clicking black background buttons does their job (~ speed haaack ~)
- (optional) automated user login
- (optional) key remapping (e.g. auto shoot to mouse button)
- clicking background accidentally does not make you lose focus from game screen


The Code

Code:
; RotMG Starter
; gtaking

; v.4
; 2017 II


; Works on desktop
; Space to close

; Creates Realm of the Mad God launcher script
;	  and its desktop shortcut (also speed hack cheat table)
; using given icon, standalone and client files
;	  which has a black background (toggle) and window concealer (optional) on top
;	  and is able to set process priority, resize game window or login (optional) automatically
;	  helps game window not to lose focus (clicks on ahk guis)
;	  allows keymapping of unchangable keys to mouse (optional)


#NoEnv
#Warn
#NoTrayIcon
#SingleInstance, Force
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
SetWorkingDir %A_ScriptDir%


; lines to edit in created code (if manual way chosen)
;	  icon 18, sa 36, run 48, iconfile 151-154, ct 250
; should be edited manually
;	  user pass 224, 231


;Menu, Tray, Icon, console.dll, 1
Menu, Tray, Icon, Shell32.dll, 50

Menu, Tray, Tip, RotMG Starter
Menu, Tray, NoStandard
Menu, Tray, Icon


mainstate := 0

flashIconPath := "C:\Windows\SysWOW64\Macromed\Flash\FlashPlayerPlugin*.exe"

exePath =
swfPath =
iconPath =
exeOK := false
swfOK := false
iconOK := false


Gui, New, +HwndDragWindow +AlwaysOnTop +Owner, RotMG Starter
Gui, %DragWindow%: Color, black
Gui, %DragWindow%: Show, x100 y100 w500 h375


Gui, New, +HwndAAA +Parent%DragWindow% +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop
Gui, %AAA%: +0x40000000 -0x80000000
Gui, %AAA%: Font, s12 cWhite, Terminal
Gui, %AAA%: Add, Text, x219 y150 w500 h30, RotMG
Gui, %AAA%: Font, s10 cWhite, Terminal
Gui, %AAA%: Add, Text, x221 y174 w500 h30, Starter
Gui, %AAA%: Color, black
Gui, %AAA%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight% NoActivate
;Gui, %AAA%: Add, Text, x218  y186  w64  h6   0x6

Sleep, 2000
Gui, %AAA%: Destroy
mainstate := 1


Gui, %DragWindow%: Font, s11 cWhite, Terminal

; standalone and client boxes
Gui, %DragWindow%: Add, Text, x92 y124 w175 h13, flash projector
Gui, %DragWindow%: Add, Text, x136 y96 w36 h12 hwndExt1, exe
Control, Hide, , , ahk_id %Ext1%
Gui, %DragWindow%: Add, Text, x118  y98  w6   h12  0x6	 hwndCol11
Gui, %DragWindow%: Add, Text, x176  y98  w6   h12  0x6   hwndCol12
Gui, %DragWindow%: Add, Text, x118  y110 w64  h6   0x6   hwndTop1
Gui, %DragWindow%: Add, Text, x118  y98  w64  h6   0x6   hwndBar1

Gui, %DragWindow%: Add, Text, x308 y124 w175 h13, game client
Gui, %DragWindow%: Add, Text, x338 y96 w36 h13 hwndExt2, swf
Control, Hide, , , ahk_id %Ext2%
Gui, %DragWindow%: Add, Text, x318  y98  w6   h12  0x6	 hwndCol21
Gui, %DragWindow%: Add, Text, x376  y98  w6   h12  0x6	 hwndCol22
Gui, %DragWindow%: Add, Text, x318  y110 w64  h6   0x6	 hwndTop2
Gui, %DragWindow%: Add, Text, x318  y98  w64  h6   0x6   hwndBar2

; icon box
Gui, %DragWindow%: Add, Text, x215 y180 w175 h12, icon file
Gui, %DragWindow%: Add, Text, x238 y210 w36 h49 hwndExt3, ico`nswf`nexe`ndll
Control, Hide, , , ahk_id %Ext3%
Gui, %DragWindow%: Add, Text, x218  y208  w6   h6   0x6  hwndCol31
Gui, %DragWindow%: Add, Text, x276  y208  w6   h6   0x6  hwndCol32
Gui, %DragWindow%: Add, Text, x218  y202  w64  h6   0x6	 hwndTop3
Gui, %DragWindow%: Add, Text, x218  y214  w64  h6   0x6  hwndBar3

;Gui, %DragWindow%: Font, s12 cWhite, Terminal
Gui, %DragWindow%: Add, Text, x213 y312 w80 h12 hwndTxt0, Drag Files

; WinSet, TransColor, F0F0F0, ahk_id %DragWindow%

Iconfile := "C:\Windows\System32\shell32.dll"
hMod := DllCall( "GetModuleHandle", str, Iconfile , ptr )
hIcon := DllCall( "LoadImage", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )
SendMessage, 0x80, 0, hIcon, , ahk_id %DragWindow%
SendMessage, 0x80, 1, hIcon, , ahk_id %DragWindow%


SetTimer, Blink, 150
bcounter := 0

Return


GuiDropFiles:
	WinActivate, ahk_id %DragWindow%
	if (mainstate == 0)
		Return
	Loop, parse, A_GuiEvent, `n
	{
		SplitPath, A_LoopField, name, dir, ext

		if (not iconOK and A_GuiX > 215 and A_GuiX < 290 and A_GuiY > 220 and A_GuiY < 295) {

			iconPath = %A_LoopField%
			if (ext == "dll") {
				iconType := 0
				Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans Icon1, %iconPath%
			}
			else if (ext == "exe") {
				iconType := 1
				Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans, %iconPath%
			}
			else if (ext == "ico") {
				iconType := 2
				Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans, %iconPath%
			}
			else if (ext == "swf") {
				iconType := 3
				Loop, Files, %flashIconPath%
				{
					swfIcon = %A_LoopFileFullPath%
					Break
				}
				Gui, %DragWindow%: Add, Picture, x218 y202 w64 h64 AltSubmit +BackgroundTrans Icon6, %swfIcon%
			}
			else {
				Return
			}
			Gui, %DragWindow%: Color, black
			iconOK := true
			Control, Hide, , , ahk_id %Col31%
			Control, Hide, , , ahk_id %Col32%
			Control, Hide, , , ahk_id %Top3%
			Control, Hide, , , ahk_id %Bar3%
			if (mainstate == 2) {
				ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
				ControlSetText, , Create Script, ahk_id %Txt0%
			}
		}
		else if (not exeOK and ext == "exe") {

			exePath = %A_LoopField%
			Gui, %DragWindow%: Add, Picture, x118 y52 w64 h64 AltSubmit +BackgroundTrans, %exePath%
			Gui, %DragWindow%: Color, black
			exeOK := true
			Control, Hide, , , ahk_id %Col11%
			Control, Hide, , , ahk_id %Col12%
			Control, Hide, , , ahk_id %Top1%
			Control, Hide, , , ahk_id %Bar1%
			if (swfOK) {
				mainstate := 2
				if (iconOK) {
					ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
					ControlSetText, , Create Script, ahk_id %Txt0%
				}
				else {
					ControlMove, , 166, 338, 180, 12, ahk_id %Txt0%
					ControlSetText, , Create Iconless Script, ahk_id %Txt0%

				}
			}
		}
		else if (not swfOK and ext == "swf") {

			swfPath = %A_LoopField%
			Loop, Files, %flashIconPath%
			{
				swfIcon = %A_LoopFileFullPath%
				Break
			}
			Gui, %DragWindow%: Add, Picture, x318 y52 w64 h64 AltSubmit +BackgroundTrans Icon6, %swfIcon%
			Gui, %DragWindow%: Color, black
			swfOK := true
			Control, Hide, , , ahk_id %Col21%
			Control, Hide, , , ahk_id %Col22%
			Control, Hide, , , ahk_id %Top2%
			Control, Hide, , , ahk_id %Bar2%
			if (exeOK) {
				mainstate := 2
				if (iconOK) {
					ControlMove, , 208, 338, 180, 12, ahk_id %Txt0%
					ControlSetText, , Create Script, ahk_id %Txt0%
				}
				else {
					ControlMove, , 166, 338, 180, 12, ahk_id %Txt0%
					ControlSetText, , Create Iconless Script, ahk_id %Txt0%
				}
			}
		}
	}
	Return


~LButton::
	MouseGetPos, mouseX, mouseY, id
	WinGetClass, class, ahk_id %id%

	if (class = "AutoHotkeyGUI") {
		if (mouseY < 25 and mouseX < 460) {
			Loop {	; now theres tilde, no need
				Sleep, 10
   				GetKeyState, state, LButton, P
   				if state = U
    		    			Break
			}
		}
		else if (mainstate == 2 and mouseY > 325 and mouseY < 355 and mouseX > 155 and mouseX < 355) { ; create script

			ControlMove, , 120, 338, 290, 12, ahk_id %Txt0%
			ControlSetText, , desktop shortcut, ahk_id %Txt0%

			SplitPath, exePath, name, dir
			ahkfilePath = %dir%\Realm of the Mad God.ahk
			ahkfile := FileOpen(ahkfilePath, "w")

			ahkfileinput := "#NoEnv`r`n#NoTrayIcon`r`n#SingleInstance, Force`r`n#WinActivateForce`r`n#MaxThreadsPerHotkey 3`r`n#KeyHistory 0`r`nListLines Off`r`nSetBatchLines, -1`r`nSetWinDelay, -1`r`nSetControlDelay, -1`r`nSetKeyDelay, -1, -1`r`nSetMouseDelay, -1`r`nSetDefaultMouseSpeed, 0`r`nSendMode Input`r`nDetectHiddenWindows, On`r`n`r`n`r`nMenu, Tray, Icon, "
			ahkfile.Write(ahkfileinput)
			
			if (not iconOK) {			; dll
				ahkfileinput := "Shell32.dll, 50"
			}
			else if (iconType == 0 or iconType == 1 or iconType == 2)	; dll, exe, ico
				ahkfileinput := iconPath ", 1"
			else if (iconType == 3)	{	; swf
				ahkfileinput := swfIcon ", 1"
			}
			ahkfile.Write(ahkfileinput)
			
			ahkfileinput := ", 1`r`nMenu, Tray, Tip, Realm of the Mad God`r`nMenu, Tray, NoStandard`r`nMenu, Tray, Add, Remove Black Background, RemovingBlackBack`r`nMenu, Tray, Add, Quit, Exiting`r`nMenu, Tray, Icon`r`n`r`n`r`nOnExit, Exiting`r`n`r`n`r`nif not A_IsAdmin`r`n{`r`n`tRun *RunAs ""%A_ScriptFullPath%"", , UseErrorLevel`r`n`tExitApp`r`n}`r`n`r`n`r`nstandalone = " name "`r`n`r`n`; black alwaysontop frame that hides window frames, optional`r`nenableBlackTop = 1`r`n`r`n`r`nwinW := 960, winH := (A_ScreenHeight>800?800:734), winX := 0+ceil((A_ScreenWidth-960+150)/2.48), winY := 0+ceil((A_ScreenHeight-734-34)/2.84)`r`nwinsW := 804, winsH := 653, winsX := A_ScreenWidth/2-round(winsW/2,-1)+21+6, winsY := A_ScreenHeight/2-round(winsH/2,-2)-17`r`n`r`n`r`nstartWin() {`r`n`tglobal`r`n`tRun, """ dir "\%standalone%"" """ swfPath """`r`n`r`n`tReturn`r`n}`r`n`r`nonWinCloseExit() {`r`n`tglobal`r`n`tWinWait, ahk_exe %standalone%`r`n`t`r`n`tGui +LastFound`r`n`th := WinExist()`r`n`r`n`tDllCall(""RegisterShellHookWindow"", UInt, h)`r`n`tMsgNum := DllCall(""RegisterWindowMessage"", Str, ""SHELLHOOK"")`r`n`tOnMessage(MsgNum, ""ShellMessage"")`r`n`t`r`n`tReturn`r`n}`r`n`r`nShellMessage(wParam, lParam) {`r`n`tglobal`r`n`tif (wParam == 2) {`t`t`; HSHELL_WINDOWDESTROYED`r`n`t`tWinGet, pn, ProcessName, ahk_id %lParam%`r`n`r`n`t`tif (pn == standalone) {`r`n`t`t`tIfWinNotExist, ahk_exe %standalone%`t`t; need recheck`r`n`t`t`t`tGoSub, Exiting`r`n`t`t}`r`n`t}`r`n`telse if ((wParam == 32772 or wParam == 4) and enabledBlackTop) {`t`t`; HSHELL_WINDOWACTIVATED`r`n`t`tWinGet, pn, ProcessName, ahk_id %lParam%`r`n`t`t`r`n`t`tif (pn == standalone) {`r`n        `tGoSub, BlackTopMinimizeCheck`r`n`t`t}`r`n`t`telse {`t`; another window is activated`r`n        }`r`n`t}`r`n`t`r`n`tReturn`r`n}`r`n`r`nstartBlackBack() {`r`n`tglobal`r`n`tGui, New, +HwndBlackBack +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`n`tGui, %BlackBack%: Color, black`r`n`r`n`ttoggleAllButtons = 0`r`n`tGui, %BlackBack%: Font, s11 cWhite, Terminal`r`n`taddBlackBackSpeedHack()`r`n`r`n`tGui, %BlackBack%: Show, x0 y0 w%A_ScreenWidth% h%A_ScreenHeight%`r`n`r`n`tReturn`r`n}`r`n`r`naddBlackBackSpeedHack() {`r`n`tglobal`r`n`ttoggleSpeedHack = 0`r`n`tiX := A_ScreenWidth-290`r`n`tiY := A_ScreenHeight-260`r`n`tx := iX+136`r`n`ty := iY+96`r`n`tGui, %BlackBack%: Add, Text,  x%x% y%y%  w116 h12        hwndTxt0, speed hack`r`n`tx := iX+118`r`n`ty := iY+88`r`n`tGui, %BlackBack%: Add, Text,  x%x% y%y%  w140 h6   0x6   hwndBot0`r`n`tGui, %BlackBack%: Add, Text,  x%x% y%y%  w6   h22  0x6`t hwndCol01`r`n`tx := iX+258`r`n`tGui, %BlackBack%: Add, Text,  x%x% y%y%  w6   h22  0x6   hwndCol02`r`n`tx := iX+118`r`n`ty := iY+110`r`n`tGui, %BlackBack%: Add, Text,  x%x% y%y%  w146 h6   0x6   hwndTop0`r`n`r`n`thideButtonBlackBack()`r`n`r`n`tReturn`r`n}`r`n`r`nhideButtonBlackBack() {`r`n`tglobal`r`n`tControl, Hide, , , ahk_id %Txt0%`r`n`tControl, Hide, , , ahk_id %Bot0%`r`n`tControl, Hide, , , ahk_id %Col01%`r`n`tControl, Hide, , , ahk_id %Col02%`r`n`tControl, Hide, , , ahk_id %Top0%`r`n`r`n`tReturn`r`n}`r`n`r`nshowButtonBlackBack() {`r`n`tglobal`r`n`tControl, Show, , , ahk_id %Txt0%`r`n`tControl, Show, , , ahk_id %Bot0%`r`n`tControl, Show, , , ahk_id %Col01%`r`n`tControl, Show, , , ahk_id %Col02%`r`n`tControl, Show, , , ahk_id %Top0%`r`n`r`n`tReturn`r`n}`r`n`r`nsetWinIcon() {`r`n`tglobal`r`n`t"
			ahkfile.Write(ahkfileinput)
			
			if (not iconOK) { 		; dll
				ahkfileinput := "Iconfile := ""C:\Windows\System32\shell32.dll""`r`n`thMod := DllCall( ""GetModuleHandle"", str, Iconfile , ptr )`r`n`thIcon := DllCall( ""LoadImage"", ptr, hMod, uint, 50, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )`r`n`tSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_BIG`r`n`tSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_SMALL`r`n"
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, C:\Windows\System32\shell32.dll, , 50, 7
			}
			else if (iconType == 0)		; dll
				ahkfileinput := "Iconfile := """ iconPath """`r`n`thMod := DllCall( ""GetModuleHandle"", str, Iconfile , ptr )`r`n`thIcon := DllCall( ""LoadImage"", ptr, hMod, uint, 0, uint, 1, int, 0, int, 0, uint, 0x8000, ptr )`r`n`tSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_BIG`r`n`tSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_SMALL`r`n"
			else if (iconType == 1)		; exe
				ahkfileinput := "Iconfile := """ iconPath """`r`n`tDllCall(""shell32\ExtractIconEx"" (A_IsUnicode ? ""W"":""A""), ptr, &Iconfile, int, 0, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint)`r`n`tSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_BIG`r`n`tSendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%`t`t; WM_SETICON, ICON_SMALL`r`n"
			else if (iconType == 2)		; ico
				ahkfileinput := "Iconfile := """ iconPath """`r`n`thIcon := DllCall( ""LoadImage"", uint, 0, str, Iconfile , uint, 1, int, 0, int, 0, uint, 0x10, ptr )`r`n`tSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_BIG`r`n`tSendMessage, 0x80, 0, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_SMALL`r`n"
			else if (iconType == 3)	{	; swf
				ahkfileinput := "Iconfile := """ swfIcon """`r`n`tDllCall(""shell32\ExtractIconEx"" (A_IsUnicode ? ""W"":""A""), ptr, &Iconfile, int, 0, PtrP, hIcon, PtrP, hIcon_small, uint, 1, uint)`r`n`tSendMessage, 0x80, 1, hIcon, , ahk_exe %standalone%`t`t`t`t; WM_SETICON, ICON_BIG`r`n`tSendMessage, 0x80, 0, hIcon_small, , ahk_exe %standalone%`t`t; WM_SETICON, ICON_SMALL`r`n"
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, %swfIcon%, , 1, 7
			}
			if (iconOK and iconType != 3)
				FileCreateShortcut, %ahkfilePath%, %A_Desktop%\Realm of the Mad God.lnk, "%A_Desktop%", , Realm of the Mad God, %iconPath%, , 1, 7

			ahkfile.Write(ahkfileinput)
			ahkfileinput := "`r`n`tReturn`r`n}`r`n`r`nsetWin() {`r`n`tglobal`r`n`tWinSetTitle, ahk_exe %standalone%, , Realm of the Mad God`r`n`tWinSet, Style, -0xC00000, ahk_exe %standalone%`r`n`tDllCall(""SetMenu"", uint, WinExist(""ahk_exe ""standalone), uint, 0)`r`n`r`n`tReturn`r`n}`r`n`r`nstartBlackTop() {`r`n`tglobal`r`n`tGui, New, +HwndBlackTop +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`n`tGui, %BlackTop%: Color, black`r`n`r`n`tGui, %BlackTop%: Show, x%winsX% y%winsY% w%winsW% h7`r`n`r`n`tGui, New, +HwndBlackLeft +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`n`tGui, %BlackLeft%: Color, black`r`n`tGui, %BlackLeft%: Show, x%winsX% y%winsY% w1 h%winsH%`r`n`tx := winsX+winsW-1`r`n`tGui, New, +HwndBlackRight +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`n`tGui, %BlackRight%: Color, black`r`n`tGui, %BlackRight%: Show, x%x% y%winsY% w1 h%winsH%`r`n`ty := winsY+winsH-1`r`n`tGui, New, +HwndBlackBot +Disabled -Caption -SysMenu -Theme +ToolWindow +AlwaysOnTop`r`n`tGui, %BlackBot%: Color, black`r`n`tGui, %BlackBot%: Show, x%winsX% y%y% w%winsW% h1`r`n`r`n`tenabledBlackTop = 1`r`n`t`r`n`tReturn`r`n}`r`n`r`nwaitScreenUntilNonBlack() {`r`n`tglobal`r`n`tSleep, 200`r`n`tWinSet, Top, , ahk_exe %standalone%`r`n`t`r`n`tLoop {`r`n`t`tSleep, 400`r`n`t`tIfWinNotActive, ahk_exe %standalone%`r`n`t`t`tWinActivate, ahk_exe %standalone%`r`n`r`n`t`tPixelGetColor, color1, 800-175, 160`r`n`t`tif (color1 != 0x000000)`r`n`t`t`tBreak`r`n`t}`r`n`r`n`tReturn`r`n}`r`n`r`nloginClick() {`r`n`tSleep, 300`r`n`tBlockInput, on`r`n`tMouseGetPos, mouseX, mouseY`r`n`tClick, 770, 40`r`n`tBlockInput, off`r`n`tClick, %mouseX%, %mouseY%, 0`r`n`r`n`tReturn`r`n}`r`n`r`nloginAsUser() {`r`n`tSleep, 600`r`n`ttmp = %ClipboardAll%`r`n`tClipboard = YOUR_EMAIL`r`n`tClipWait`r`n`tSend, ^v`r`n`tSleep, 120 `; pastewait`r`n`tClipboard =`r`n`tSleep, 300`r`n`tSend, {tab}`r`n`tClipboard = YOUR_PASSWORD`r`n`tClipWait`r`n`tSend, ^v`r`n`tSleep, 120 `; pastewait`r`n`tClipboard = %tmp%`r`n`tSleep, 300`r`n`tSend, {tab 2}`r`n`tSleep, 600`r`n`tSend, {enter}`r`n`t`r`n`tSleep, 2000`t`; timeout for disappearance of button when win rescale`r`n`tReturn`r`n}`r`n`r`npushButtonBlackBackSpeedHack() {`r`n`tglobal`r`n`ttoggleSpeedHack = 1`r`n`tshowButtonBlackBack()`r`n`r`n`tRun, """ dir "\speedhack.ct""`r`n`r`n`tWinWaitActive, Confirmation`r`n`tSend, {Enter}`r`n`r`n`tWinWait, Cheat Engine`r`n`tWinSet, Bottom, , Cheat Engine`r`n`tWinMove, Cheat Engine, , winX+winW-(75-3)-613, winY+winH-(75-26+10)-593, 613, 593`r`n`tWinSet, ExStyle, ^0x80, Cheat Engine`t`t`; 0x80 is WS_EX_TOOLWINDOW`r`n`r`n`tSleep, 1500`r`n`thideButtonBlackBack()`r`n`ttoggleSpeedHack = 0`r`n`r`n`tReturn`r`n}`r`n`r`nmakeWinBig() {`r`n`tglobal`r`n`tWinMove, ahk_id %BlackTop%  , , , , winW-12`r`n`tWinMove, ahk_id %BlackLeft% , , , , , winH-6`r`n`tWinMove, ahk_id %BlackRight%, , , , , winH-6`r`n`tWinMove, ahk_id %BlackBot%  , , , , winW-12`r`n`tSleep, 300`r`n`tWinMove, ahk_id %BlackTop%  , , winX+6, winY`r`n`tWinMove, ahk_id %BlackLeft% , , winX+6, winY`r`n`tWinMove, ahk_id %BlackRight%, , winX-6+winW-1, winY`r`n`tWinMove, ahk_id %BlackBot%  , , winX+6, winY+winH-1-6`r`n`r`n`tWinMove, ahk_exe %standalone%, , winX, winY, winW, winH`r`n`r`n`tReturn`r`n}`r`n`r`n`r`nstartWin()`r`n`r`nstartBlackBack()`r`n`r`nonWinCloseExit()`r`nsetWinIcon()`r`nsetWin()`r`n`r`nif (enableBlackTop)`r`n`tstartBlackTop()`r`nWinMove, ahk_exe %standalone%, , winsX-6, winsY`r`n`r`nProcess, Priority, %standalone%, high`r`nWinSet, AlwaysOnTop, off, ahk_id %BlackBack%`r`n`r`nwaitScreenUntilNonBlack()`r`n`r`nIfWinNotActive, ahk_exe %standalone%`r`n`tWinActivate, ahk_exe %standalone%`r`nPixelGetColor, color1, 800-117, 41`r`nPixelGetColor, color2, 800-92 , 41`r`nif (color1 == 0xFFFFFF and color2 == 0xFFFFFF) {`r`n`tloginClick()`r`n`tloginAsUser()`r`n`tmakeWinBig()`r`n}`r`nelse {`r`n`tmakeWinBig()`r`n}`r`n`r`nReturn`r`n`r`n`r`nBlackTopMinimizeCheck:`r`n`tLoop 10 {`r`n`t`tSleep, 20`t`; minimize wait loop`r`n`t`tWinGet, isMin, MinMax, ahk_exe %standalone%`r`n`t`t`r`n`t`tif (isMin != isMinLast)`r`n`t`t{`r`n`t`t`tif (isMin != -1) {`r`n`t`t`t`tGui, %BlackTop%: Show`r`n`t`t`t`tGui, %BlackLeft%: Show`r`n`t`t`t`tGui, %BlackRight%: Show`r`n`t`t`t`tGui, %BlackBot%: Show`r`n`t`t`t}`r`n`t`t`telse {`r`n`t`t`t`tGui, %BlackTop%: Show, Hide`r`n`t`t`t`tGui, %BlackLeft%: Show, Hide`r`n`t`t`t`tGui, %BlackRight%: Show, Hide`r`n`t`t`t`tGui, %BlackBot%: Show, Hide`r`n`t`t`t}`r`n`t`t`tisMinLast := isMin`r`n`t`t`tBreak`r`n`t`t}`r`n`t}`r`n`r`nReturn`r`n`r`n`r`nAddingBlackBack:`r`n`tMenu, Tray, Delete, Add Black Background`r`n`tMenu, Tray, Insert, Quit, Remove Black Background, RemovingBlackBack`r`n`tGui, %BlackBack%: Show`r`n`tWinActivate, ahk_exe %standalone%`r`n`r`nReturn`r`n`t`r`nRemovingBlackBack:`r`n`tMenu, Tray, Delete, Remove Black Background`r`n`tMenu, Tray, Insert, Quit, Add Black Background, AddingBlackBack`r`n`tGui, %BlackBack%: Hide`r`n`tWinActivate, ahk_exe %standalone%`r`n`t`r`nReturn`r`n`t`r`nExiting:`r`nGuiClose:`r`n`tWinActivate, ahk_id %BlackBack%`r`n`tIfWinExist, Cheat Engine`r`n`t`tWinClose, Cheat Engine`r`n`tWinClose, ahk_exe %standalone%`r`n`r`nExitApp`r`n`r`n`r`n~LButton::`r`n`tMouseGetPos, mouseX, mouseY, id`r`n`tWinGetClass, class, ahk_id %id%`r`n`r`n`tif (class == ""AutoHotkeyGUI"") {`r`n`t`tif (not WinExist(""Cheat Engine"") and mouseX > A_ScreenWidth-350 and mouseY > A_ScreenHeight-300 and not toggleSpeedHack) {`r`n`t`t`tpushButtonBlackBackSpeedHack()`r`n`t`t}`r`n`t`telse if (mouseX > A_ScreenWidth-350 and mouseY < 300 and not toggleAllButtons) {`r`n`t`t`ttoggleAllButtons = 1`r`n`t`t`tshowButtonBlackBack()`r`n`t`t`tWinActivate, ahk_exe %standalone%`r`n`t`t`tSleep, 2500`r`n`t`t`thideButtonBlackBack()`r`n`t`t`ttoggleAllButtons = 0`r`n`t`t}`r`n`t`telse {`r`n`t`t`tWinActivate, ahk_exe %standalone%`r`n`t`t}`r`n`t}`r`n`telse if (class == ""Shell_TrayWnd"") {`r`n`t`tif (mouseX >= A_ScreenWidth-5 and enabledBlackTop) {`r`n`t`t`tGoSub, BlackTopMinimizeCheck`r`n`t`t}`r`n`t}`r`n`r`nReturn`r`n`r`n`r`n~RButton::`r`n~XButton1::`r`n~XButton2::`r`n`tMouseGetPos, , , id`r`n`tWinGetClass, class, ahk_id %id%`r`n`r`n`tif (class == ""AutoHotkeyGUI"") {`r`n`t`tWinActivate, ahk_exe %standalone%`r`n`t}`r`n`r`nReturn`r`n`r`n`r`n#If WinActive(""ahk_exe ""standalone)`r`n`tXButton2::I`r`n`r`nReturn`r`n`r`n"
			ahkfile.Write(ahkfileinput)
			ahkfile.Close()

			IfNotExist, %dir%\speedhack.ct
			{
				ctfileinput := "<?xml version=""1.0"" encoding=""utf-8""?>`r`n<CheatTable CheatEngineTableVersion=""18"">`r`n<CheatEntries/>`r`n<UserdefinedSymbols/>`r`n<LuaScript>`r`n`r`nopenProcess(""" name """)`r`n`r`nlastSpeed = 1`r`n`r`nfunction checkKeys(timer)`r`n`tif (isKeyPressed(VK_XBUTTON1))`r`n`tthen`r`n`t`tif lastspeed ~= 3`r`n`t`tthen`r`n`t`t`tspeedhack_setSpeed(3)`r`n`t`t`tlastSpeed = 3`r`n`t`tend`r`n`telse`r`n`t`tif lastspeed ~= 1`r`n`t`tthen`r`n`t`t`tspeedhack_setSpeed(1)`r`n`t`t`tlastSpeed = 1`r`n`t`tend`r`n`tend`r`nend`r`n`r`nt = createTimer(nil)`r`n`ttimer_setInterval(t, 10)`r`n`ttimer_onTimer(t, checkKeys)`r`n`ttimer_setEnabled(t, true)`r`n`r`n</LuaScript>`r`n</CheatTable>"
				FileAppend, %ctfileinput%, %dir%\speedhack.ct
			}

			ControlSetText, , desktop shortcut has been created..., ahk_id %Txt0%
		}
		Return
	}
	else if (class = "Shell_TrayWnd") {
		Return	; now theres tilde, no need to block
	}
	else  {
		if (mainstate == 2 and not iconOK) { ; repeated code
			Loop 50 {
				Sleep, 10
				GetKeyState, state, LButton, P
				if (state == "U")
					Return
			}
			Control, Show, , , ahk_id %Ext3%
			Loop {
    				Sleep, 10
   				GetKeyState, state, LButton, P
   				if (state == "U")
				{
					ControlMove, , , , , 1, ahk_id %Ext3%
					Control, Hide, , , ahk_id %Ext3%
					ControlMove, , , 240, , , ahk_id %Bar3%
					ControlMove, , , , , 6, ahk_id %Col31%
					ControlMove, , , , , 6, ahk_id %Col32%
    		    			Break
				}
				ControlGetPos, , z, , , , ahk_id %Bar3%
				if (z < 285) {
					a := (292-z)>>3
					z := z+a
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , z-236, ahk_id %Ext3%
					ControlMove, , , , , z-232, ahk_id %Col31%
					ControlMove, , , , , z-232, ahk_id %Col32%
				}
				else if (z == 286) {
				}
				else {
					z := 286
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , 49, ahk_id %Ext3%
				}
			}
			Return
		}
		else if (mainstate != 1)
			Return

		Sleep, 500

		Control, Show, , , ahk_id %Ext1%
		Control, Show, , , ahk_id %Ext2%
		Control, Show, , , ahk_id %Ext3%
		
		GetKeyState, state, LButton, P
		if (state == "D" and mainstate == 1) {
			ControlMove, , 175, 338, 180, 12, ahk_id %Txt0%
			ControlSetText, , Drop into the Window, ahk_id %Txt0%
		}

		Loop {
    		Sleep, 10
   			GetKeyState, state, LButton, P
   			if (state == "U")
			{
				ControlMove, , , , , 1, ahk_id %Ext3%
				Control, Hide, , , ahk_id %Ext1%
				Control, Hide, , , ahk_id %Ext2%
				Control, Hide, , , ahk_id %Ext3%

				ControlMove, , , 124, , , ahk_id %Bar1%
				ControlMove, , , 124, , , ahk_id %Bar2%
				ControlMove, , , 240, , , ahk_id %Bar3%
				ControlMove, , , 130, , 6, ahk_id %Col11%
				ControlMove, , , 130, , 6, ahk_id %Col12%
				ControlMove, , , 130, , 6, ahk_id %Col21%
				ControlMove, , , 130, , 6, ahk_id %Col22%
				ControlMove, , , , , 6, ahk_id %Col31%
				ControlMove, , , , , 6, ahk_id %Col32%

				if (mainstate == 1) {
					ControlMove, , 216, 338, 80, 12, ahk_id %Txt0%
					ControlSetText, , Drag Files, ahk_id %Txt0%
				}
    		    		Break
			}
			if (1) { ; one of them might be hidden but still move
				ControlGetPos, , y, , , , ahk_id %Bar1%
				if (y > 114) {
					a := (114-y)>>5
					y := y+a
					ControlMove, , , y, , , ahk_id %Bar1%
					ControlMove, , , y, , , ahk_id %Bar2%
					a := y+6
					b := 131-y
					ControlMove, , , a, , b, ahk_id %Col11%
					ControlMove, , , a, , b, ahk_id %Col12%
					ControlMove, , , a, , b, ahk_id %Col21%
					ControlMove, , , a, , b, ahk_id %Col22%
				}
				else if (y == 114) {
				}
				else {
					y := 114
					ControlMove, , , , , 13, ahk_id %Ext1%
					ControlMove, , , , , 13, ahk_id %Ext2%
					ControlMove, , , y, , , ahk_id %Bar1%
					ControlMove, , , y, , , ahk_id %Bar2%
				}
			}
			if (not iconOK) { ; repeated code
				ControlGetPos, , z, , , , ahk_id %Bar3%
				if (z < 285) {
					a := (292-z)>>3
					z := z+a
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , z-236, ahk_id %Ext3%
					ControlMove, , , , , z-232, ahk_id %Col31%
					ControlMove, , , , , z-232, ahk_id %Col32%
				}
				else if (z == 286) {
				}
				else {
					z := 286
					ControlMove, , , z, , , ahk_id %Bar3%
					ControlMove, , , , , 49, ahk_id %Ext3%
				}
			}
		}
	}
	Return


Blink:
	if (bcounter = 19) {
		Control, Hide, , , ahk_id %Txt0%
		bcounter := 0
	}
	else if (bcounter = 0) {
		Control, Show, , , ahk_id %Txt0%
		bcounter++
	}
	else
		bcounter++
	Return


GuiClose:
Space::
	ExitApp
	Return

Edit: If IfWinNotExist recheck too fast, program may not close itself (happens rarely), then add Sleep, 100 line before it.
Also rescale issues with disappearing login button known (on rescale comment line)
#7 · edited 9y ago · 9y ago
CO
colson
you can just send a run command with your muledump link and it opens your account, you can change the client to
#8 · 9y ago
GT
gtaking
watched some vids to understand what you meant. (i dont use mules so i dont know what its totally capable of)
those guys are working, eh? rivalllss! :P

well if you can directly send user/pass to server ofc its better. but!

does mule has better interface which can start in given window size?
(this script is for actually playing the game; visuality and other things stated in main post)
(for example we can put muledump in run command, skip simulating mouse/keys there are still some benefits)

im using this (~ it has 1 userrr ~) to get released product look and it looks good for my use
(and cant force anyone if they want to do these stuff manually)
#9 · 9y ago
CO
colson
you can use the WinMove command to resize a window
#10 · 9y ago
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

  • My Game StarterBy Dreamer in Visual Basic Programming
    2Last post 16y ago
  • [Help] Combat Arms Game StarterBy Cryptonic in Visual Basic Programming
    12Last post 15y ago
  • AHK script not working ONLY on vindictus :(By dustinhack in Vindictus Help
    0Last post 14y ago
  • AHK ScriptBy rsca in Call of Duty Modern Warfare 3 Coding, Programming & Source Code
    1Last post 14y ago
  • Need help with an AHK scriptBy Arrowins in Call of Duty Modern Warfare 2 Help
    1Last post 15y ago

Tags for this Thread

#ahk#ahk script#desktop