Search found 716 matches

by Hellbent
16 May 2018, 01:28
Forum: Scripts and Functions
Topic: 2048 Game
Replies: 18
Views: 2657

2048 Game

I had a few hours to kill so I thought I would take a stab at the game 2048. I did this in one sitting and was getting very bored/tired by the end so I didn't bother cleaning up my code, I might clean up the code and redo the gui later (That's code for never). I did a fair amount of play testing and...
by Hellbent
16 May 2018, 01:10
Forum: Ask For Help
Topic: Gui control variable names as array / pseudo-array
Replies: 3
Views: 515

Re: Gui control variable names as array / pseudo-array

Also you need to change your labels to:

GadgetGuiEscape:
GadgetGuiClose:
ExitApp

I think that you can set it up so you don't need to do this by setting your gui as the default gui, but because it has never been something that has been a issue for me I don't know the code off hand.
by Hellbent
16 May 2018, 01:05
Forum: Ask For Help
Topic: Gui control variable names as array / pseudo-array
Replies: 3
Views: 515

Re: Gui control variable names as array / pseudo-array

typo:
GuiControl, Gagdet: , GuiTextID%A_Index%, %A_Index%

Gagdet: Should be Gadget:
by Hellbent
04 May 2018, 21:23
Forum: Ask For Help
Topic: Getting a GUI to move with another window?
Replies: 11
Views: 1373

Re: Getting a GUI to move with another window?

FanaticGuru wrote:Stuff
Thanks, i'll have a look over this sometime this weekend.
by Hellbent
02 May 2018, 23:50
Forum: Ask For Help
Topic: Getting a GUI to move with another window?
Replies: 11
Views: 1373

Re: Getting a GUI to move with another window?

I have one program that I monitor for with a hook and any time it is opened I haven't bothered looking at anything to do with "hooks", thought they had to do with keyboard keys or some other thing i'm not interested in. The way you said the line I quoted suggests something other than something to d...
by Hellbent
02 May 2018, 22:54
Forum: Ask For Help
Topic: How to display contents of an array in list format in a msgbox?
Replies: 3
Views: 344

Re: How to display contents of an array in list format in a msgbox?

#SingleInstance,Force test_Array:= ["dog","cat","bird","lion","sheep"] ;Example 1 Loop,% test_Array.Length() (A_Index!=test_Array.MaxIndex())?(temp.=Test_Array[A_Index] " "):(temp.=Test_Array[A_Index]) msgbox,% temp ;Example 2 Loop,% test_Array.Length() (A_Index!=test_Array.MaxIndex())?(temp2.= """...
by Hellbent
29 Apr 2018, 00:05
Forum: Ask For Help
Topic: ListView commands not working when called from Gui context menu
Replies: 6
Views: 769

Re: ListView commands not working when called from Gui context menu

That is odd, the function is definitely getting called, but no action.

Another odd thing is that if you replace your GuiContextMenu sub with this it works fine.

Code: Select all

GuiContextMenu:
	if (A_GuiControl == "ListView") {
		;Menu,ListViewContextMenu,Show, %A_GuiX%, %A_GuiY%
		 gosub ButtonResizeColumns
	 }
by Hellbent
28 Apr 2018, 22:29
Forum: Ask For Help
Topic: Help with Multiple Gui Tabs Topic is solved
Replies: 5
Views: 582

Re: Help with Multiple Gui Tabs Topic is solved

It looks like you are trying to add the same tab control everytime you switch to it.

Add your inner tabs to your main gui and set one of them to hidden to begin with.
Then when you want to switch between them, just show one and hide the other.
by Hellbent
28 Apr 2018, 19:59
Forum: Ask For Help
Topic: Always on Top gui with a button in it to set windows always on top problem Topic is solved
Replies: 6
Views: 683

Re: Always on Top gui with a button in it to set windows always on top problem Topic is solved

https://i.imgur.com/763I7ab.jpg #SingleInstance,Force Gui,+AlwaysOnTop -Caption +Border Gui,Color,Black Gui,1:Font,s10 Q4, Segoe UI Black Gui,Add,Progress,x0 y0 w240 h2 BackgroundYellow Gui,Add,Progress,x0 y123 w240 h2 BackgroundYellow Gui,Add,Progress,x0 y0 w2 h125 BackgroundYellow Gui,Add,Progres...
by Hellbent
28 Apr 2018, 17:10
Forum: Ask For Help
Topic: Always on Top gui with a button in it to set windows always on top problem Topic is solved
Replies: 6
Views: 683

Re: Always on Top gui with a button in it to set windows always on top problem Topic is solved

hello i made a gui with all my hotkeys the gui is always on top i want to add a button that sets the window that was active before i hit the knob always on top to always on top is this possible? any help is appreciated thank you While what you are looking to do is not imposable, I would think that ...
by Hellbent
28 Apr 2018, 04:26
Forum: Ask For Help
Topic: Two Sounds Overlapping Each Other
Replies: 3
Views: 356

Re: Two Sounds Overlapping Each Other

This code works. You forgot to add quotes around the name of the key in your "GetKeyState"

Code: Select all

~CapsLock::
	if(GetKeyState("Capslock","T"))
		Soundplay C:\Windows\media\Windows Print complete.wav
	else
		Soundplay C:\Windows\media\Windows Unlock.wav
	return
by Hellbent
28 Apr 2018, 04:10
Forum: Ask For Help
Topic: Two Sounds Overlapping Each Other
Replies: 3
Views: 356

Re: Two Sounds Overlapping Each Other

I just tested it and i'm not hearing them play simultaneously

This is my code

Code: Select all

#SingleInstance,Force
~CapsLock::
	CLState:=!CLState
	if(CLState)
		Soundplay C:\Windows\media\Windows Print complete.wav
	else
		Soundplay C:\Windows\media\Windows Unlock.wav
return	
*^+ESC::ExitApp
by Hellbent
28 Apr 2018, 03:49
Forum: Ask For Help
Topic: How to use variables inside functions with double quotes? Topic is solved
Replies: 2
Views: 360

Re: How to use variables inside functions with double quotes? Topic is solved

Try this

Code: Select all

Var:="notepad.exe"

~LButton::
	if winactive("ahk_exe " Var){
MsgBox, Yes, you clicked inside the executable area.
}
Return

by Hellbent
27 Apr 2018, 21:55
Forum: Ask For Help
Topic: Terminate a script as soon as an IF command is TRUE
Replies: 3
Views: 478

Re: Terminate a script as soon as an IF command is TRUE

Code: Select all

ifWinexist, Name
	ExitApp
	
if(Some_Statement)
	ExitApp
	
if(Something > something_else)
	{
		Msgbox, the script will now exit
		ExitApp
	}		
	

Questions?
by Hellbent
27 Apr 2018, 20:49
Forum: Ask For Help
Topic: Moving a object from point a to point b in steps Topic is solved
Replies: 16
Views: 1161

Re: Moving a object from point a to point b in steps Topic is solved

I doubt there is a better one. I did some testing on the two versions before turning in last night, and although my version moved just as well as Wolfs, when tested for operation speed the results were far from being par. I set the script to run 1000 cycles, and in each cycle I had the bit of code ...
by Hellbent
27 Apr 2018, 20:28
Forum: Ask For Help
Topic: Listbox in black with white letters possible? Topic is solved
Replies: 8
Views: 767

Re: Listbox in black with white letters possible? Topic is solved

if i remove Gui -Caption the gui is no longer transparent i don't understand why i would need that to begin with to be honest, The -Caption option removes the title bar, border from your gui, it doesn't have anything to do with transparency. Built into the title bar "Caption" is the ability to clic...
by Hellbent
27 Apr 2018, 06:12
Forum: Ask For Help
Topic: Moving a object from point a to point b in steps Topic is solved
Replies: 16
Views: 1161

Re: Moving a object from point a to point b in steps Topic is solved

Try this with function ATan2(): First off, I would like to thank you for your time. Your approach will make me look into how the tan(), sin(), and cos() functions work. They are something that I have never had any reason to look up before, and didn't know they existed. I haven't had to deal with an...
by Hellbent
27 Apr 2018, 03:32
Forum: Ask For Help
Topic: Moving a object from point a to point b in steps Topic is solved
Replies: 16
Views: 1161

Re: Moving a object from point a to point b in steps Topic is solved

My suggestion is to calculate and use the x/y-components of the bullet's trajectory. (Bullet.vx, Bullet.vy) This does nothing. [...] You did not calculate the x/y-components yet. Those variables are empty. Your Bullet.X+=Bullet.vx is the same as my Bullet.X+=Bullet.Speed*X_Ratio But in your case yo...
by Hellbent
27 Apr 2018, 03:18
Forum: Ask For Help
Topic: Moving a object from point a to point b in steps Topic is solved
Replies: 16
Views: 1161

Re: Moving a object from point a to point b in steps Topic is solved

The idea behind the model I'm using is for every frame: add the x/y-components of the velocity to the x/y-components of the Bullet to the position of the bullet. So, in your case: cycle: ; ... Bullet.X += Bullet.vx Bullet.Y += Bullet.vy GuiControl,Move,Bullet,% "x" Bullet.X " y" Bullet.Y My suggest...

Go to advanced search