Search found 553 matches

by 4GForce
17 Mar 2017, 00:10
Forum: Ask For Help
Topic: Pedantic nerd question: Declaring nil variables !
Replies: 4
Views: 1228

Pedantic nerd question: Declaring nil variables !

I used the 'pedantic' keyword to get Lexikos attention on this one =p Partially in reference to this post: https://autohotkey.com/boards/viewtopic.php?f=5&t=29187 As a nerd I had to run some tests ... I ended up with a headache trying to figure this one out ... Declaring a variable as "" doesn't ass...
by 4GForce
16 Mar 2017, 22:41
Forum: Ask For Help
Topic: Login
Replies: 24
Views: 5827

Re: Login

in other words the mighty coder here like 4GForce, Bruttosozialprodukkt... and off course Lexikos Geez, ty, I'll try not to let that get to my head. I don't know who Brutto is, but it must almost feel like an insult for Lexikos to be put in the same basket as me. He's way better than I am. be curio...
by 4GForce
16 Mar 2017, 17:35
Forum: Ask For Help
Topic: An attempt at a script that creates MsgBoxes/InputBoxes for other scripts
Replies: 5
Views: 2098

Re: An attempt at a script that creates MsgBoxes/InputBoxes for other scripts

1- Why not have an object that you can include and instantiate ... having 2 scripts running doesn't seem like a good solution. 2- Labels inside a function ... eurk :sick: ... this is what is breaking your code flow and preventing multiple simultaneous guis. Have a look at this, could give you ideas ...
by 4GForce
16 Mar 2017, 17:14
Forum: Ask For Help
Topic: .GIF in GUI Related (got working script) need automation on key press (.gif won't reload)
Replies: 6
Views: 1947

Re: .GIF in GUI Related (got working script) need automation on key press (.gif won't reload)

Recreate the gui on each keypress #include AnimatedGifControl.ahk mygif := A_ScriptDir "\Newtons_cradle_animation_book_2.gif" F1:: Gui, mygifGUI:New, -Caption +AlwaysOnTop Gui, mygifGUI:Margin, 0, 0 AnimatedGifControl("mygifGUI", mygif, "x0 y0 w100 h100") Gui, mygifGUI:Show, x700 y840, % "Gui Title"...
by 4GForce
16 Mar 2017, 16:03
Forum: Ask For Help
Topic: Login
Replies: 24
Views: 5827

Re: Login

The Gui Destroy makes it if you get the right password and username it destroys the login gui, and goes to the next gui! That works ... Gui New would do the same thing Naming the guis is also always a good practice to avoid confusion Gui LoginGui:New Gui MainGui:New https://autohotkey.com/docs/comm...
by 4GForce
16 Mar 2017, 15:57
Forum: Ask For Help
Topic: Getting unselectable text
Replies: 4
Views: 1120

Re: Getting unselectable text

I don't know what you've actually tried ... ControlGetText, ComObject ... ?

Anyway 1st thing would be to make sure its text ... not an image.
Right-click ... Inspect ... what does it look like ?
by 4GForce
16 Mar 2017, 15:47
Forum: Ask For Help
Topic: Login
Replies: 24
Views: 5827

Re: Login

if not (the username exist) { MsgBox, your username does'nt exist. } else if (the password is incorrect) { MsgBox, your username is incorrect } else (login succeded) { ; ... } Logins don't usually specify if the username or password is incorrect, just incorrect credentials. Reason being that it wou...
by 4GForce
16 Mar 2017, 15:05
Forum: Ask For Help
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 6691

Re: Using an Array in ControlGetText? Topic is solved

How does global-ness work for classes? Are they available to all functions by default or do I need to import them like global variables? Can they be made super-global? Depending on your AHK version ... When the script is loaded, this constructs an object and stores it in the global (or in v1.1.05+,...
by 4GForce
16 Mar 2017, 13:10
Forum: Ask For Help
Topic: What files are created when you run an Autohotkey Script?
Replies: 2
Views: 700

Re: What files are created when you run an Autohotkey Script?

None, unless the script implicitly create them.
The .ahk are compiled/ran by AutoHotkey.exe
The script are ran in memory, not from the files.
Prefetch is an OS mecanic for any new .exe that are ran. ( AutoHotkey.exe has one also )
by 4GForce
16 Mar 2017, 12:52
Forum: Ask For Help
Topic: How to delete first 10 lines of a .txt file?
Replies: 12
Views: 2764

Re: How to delete first 10 lines of a .txt file?

Like kon said, you need to read the whole file, delete the lines and overwrite the file with the remaining content. FileAppend
by 4GForce
16 Mar 2017, 12:45
Forum: Ask For Help
Topic: Login
Replies: 24
Views: 5827

Re: Login

And bassicaly I want to attach it to a program, before the real program starts I want this to come up. Lets just say this is the script for the real program Follow this template ... #singleinstance force gosub ShowLogin Return ShowLogin: ; build and show your login gui here Return Login: ; this is ...
by 4GForce
16 Mar 2017, 12:17
Forum: Ask For Help
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 6691

Re: Using an Array in ControlGetText? Topic is solved

@4GForce I understand classes even less than objects, but I do agree it sounds like what I want. They are pretty much the same. A class is an object and also a blueprint to create new objects. I mostly understand the code you provided (although I'm shaky on the syntax), except for one thing - how d...
by 4GForce
15 Mar 2017, 17:55
Forum: Ask For Help
Topic: Using an Array in ControlGetText? (Plus a Bunch of Object Q&A!) Topic is solved
Replies: 38
Views: 6691

Re: Using an Array in ControlGetText? Topic is solved

Aren't numbers and strings objects in some way ? Anyway, no cigar for ControlGetText ... You should consider a class for your Products Something like this ... (UNTESTED) loop 16 { ControlGetText, barCode,, ahk_id winHwnd ControlGetText, price,, ahk_id winHwnd ControlGetText, description,, ahk_id win...
by 4GForce
15 Mar 2017, 13:43
Forum: Ask For Help
Topic: Keywait for one of two keys
Replies: 4
Views: 1593

Re: Keywait for one of two keys

( UNTESTED )

Code: Select all

~insert::
	sendinput {i down}
	while(GetKeyState("insert", "P") AND GetKeyState("LButton", "P")) {
		Sleep 1
	}
	sendinput {i up}
Return
by 4GForce
15 Mar 2017, 10:09
Forum: Ask For Help
Topic: Cannot get this simple code working
Replies: 5
Views: 1502

Re: Cannot get this simple code working

#IfWinActive ahk_class #32770; Found the class with WinSpy and WindowInfo 1.7.
You're missing a space in front of the semi colon.
You could try a WinMove or something like that to visually check if you have the proper window handle.
by 4GForce
15 Mar 2017, 01:50
Forum: Offtopic
Topic: « What's on your mind? »
Replies: 4230
Views: 735510

Re: « What's on your mind? »

That snowstorm ... drive safely !
https://twitter.com/i/web/status/841782533347983362
by 4GForce
15 Mar 2017, 01:28
Forum: Ask For Help
Topic: Disable BlockInput after 10 sec
Replies: 8
Views: 1723

Re: Disable BlockInput after 10 sec

I need to reboot my computer to regain accessibility. Ctrl+Alt+Del should still work and let you close the script without rebooting ... ( win 7 tested ) Sry Boiler but I don't like labels =p TimedBlockInput(seconds, unblock := False) { if(unblock) { BlockInput Off } else { BlockInput On msec := 100...
by 4GForce
15 Mar 2017, 00:35
Forum: Ask For Help
Topic: How to use com interface for two different excel workbooks at the same time?
Replies: 3
Views: 909

Re: How to use com interface for two different excel workbooks at the same time?

FanaticGuru is the expert in excel stuff but I'd say that you should create your object as globals .... specify the fulll path if necessary. ( UNTESTED ) oWB1 := ComObjGet("Book1.xlsx") oWB2 := ComObjGet("123.xlsx") F1:: oWB2.ActiveSheet.Range("A1").Value := "this is 123.xlsx" Return F2:: oWB1.Activ...
by 4GForce
15 Mar 2017, 00:23
Forum: Ask For Help
Topic: Please help me to understand these codes?
Replies: 8
Views: 1424

Re: Please help me to understand these codes?

Sabestian Caine wrote: thanks dear 4GForce.......
you are really great...
:dance:
by 4GForce
15 Mar 2017, 00:11
Forum: Ask For Help
Topic: I want to sort of combine these two scripts (one of them I found online and don't know/want to mess with it)
Replies: 2
Views: 717

Re: I want to sort of combine these two scripts (one of them I found online and don't know/want to mess with it)

To me, those script logic are just wrong ... I hope to learn with you, let's see what others think ... /* START AutoExecSection */ ; #CompilerInstructions ( singleinstance, noenv, ... ) ; ScriptSettings ( SendMode, CoordMode, SetKeyDelay, ... ) ; Variables declarations ; Basic logic (10-20 lines) /*...

Go to advanced search