Search found 47 matches

by madsounds
18 Aug 2020, 02:11
Forum: AutoHotkey v2 Help
Topic: A RawPath ? No parameters, no variables ? Topic is solved
Replies: 4
Views: 1797

Re: A RawPath ? No parameters, no variables ? Topic is solved

Great! I don't understand yet completely what it does, but saved your function just in case :-)
by madsounds
18 Aug 2020, 00:57
Forum: AutoHotkey v2 Help
Topic: PostMessage to simulate Edit control change?
Replies: 1
Views: 154

PostMessage to simulate Edit control change?

PostMessage example to raise Edit control change event? Is it possible?

When I call just ControlSetText function, the target window doesn't react to new text. So maybe it's possible to raise "change" event, preferably without sending keystrokes.
by madsounds
16 Aug 2020, 19:39
Forum: Ask For Help
Topic: Google didn't close correctly issue Topic is solved
Replies: 8
Views: 4556

Re: Google didn't close correctly issue Topic is solved

It's nice you found a solution!
by madsounds
16 Aug 2020, 08:55
Forum: AutoHotkey v2 Help
Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
Replies: 8
Views: 3272

Re: A_LoopFileFullPath doesn't work for a folder Topic is solved

The thing is that paths that are passed to FullPath function, initially stored in INI file. They could be written by another user, so I can't be sure if a path is relative or absolute. Then these paths will be passed to command line utility, where absolute path is preferred to avoid strings like ".....
by madsounds
16 Aug 2020, 06:56
Forum: AutoHotkey v2 Help
Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
Replies: 8
Views: 3272

Re: A_LoopFileFullPath doesn't work for a folder Topic is solved

The filename that passes to function might be either short path or full path. This function is needed just to avoid guessing :-) It always return full path.
by madsounds
16 Aug 2020, 04:36
Forum: Ask For Help
Topic: Google didn't close correctly issue Topic is solved
Replies: 8
Views: 4556

Re: Google didn't close correctly issue Topic is solved

If you want to avoid such Chrome's error window, after browser crashed last time, I've heard it's impossible to disable this error. But you of course can close it via AHK. I'm not sure if "Restore pages?" is window's title or just a text, so try one of this: loop { WinClose % "Restore pages? ahk_exe...
by madsounds
16 Aug 2020, 04:20
Forum: AutoHotkey v2 Help
Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
Replies: 8
Views: 3272

Re: A_LoopFileFullPath doesn't work for a folder Topic is solved

FredOoo > As soon as break or return is encountered, you exit the loop. So you'll always loop once. It's a trick described somewhere in AHK docs :-) There's no other way to find out file of folder's full path but to get it from A_LoopFileFullPath variable. And this variable is available only inside...
by madsounds
16 Aug 2020, 02:57
Forum: AutoHotkey v2 Help
Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
Replies: 8
Views: 3272

Re: A_LoopFileFullPath doesn't work for a folder Topic is solved

Turns out I forgot to add "DF" options :-) This one works well:

Code: Select all

FullPath( filename )
{
	loop files filename, "DF"
	{
		return A_LoopFileFullPath
	}
}

MsgBox FullPath( "folder" ) ;returns "D:\Downloads\folder"
by madsounds
16 Aug 2020, 02:17
Forum: Ask For Help
Topic: RightShift RightControl and Letter - Syntax? Topic is solved
Replies: 3
Views: 1808

Re: RightShift RightControl and Letter - Syntax? Topic is solved

Seems that it doesn't support more than 2 keys :(
by madsounds
16 Aug 2020, 02:10
Forum: Ask For Help
Topic: Google didn't close correctly issue Topic is solved
Replies: 8
Views: 4556

Re: Google didn't close correctly issue Topic is solved

Hi, please show the script so I could try to launch it :-)
by madsounds
16 Aug 2020, 01:54
Forum: AutoHotkey v2 Help
Topic: A_LoopFileFullPath doesn't work for a folder Topic is solved
Replies: 8
Views: 3272

A_LoopFileFullPath doesn't work for a folder Topic is solved

Hi there! I'm using AutoHotkey_2.0-a122-f595abc2. I had to make a function that return file's of folder's full path, including its name. But this function does not always work for folders. In the script directory, I have files "file", "file.txt" and folder "folder". FullPath_v1( filename ) { loop fi...
by madsounds
16 Jul 2020, 15:05
Forum: AutoHotkey v2 Help
Topic: String prototype not available (AHK2) Topic is solved
Replies: 8
Views: 2501

Re: String prototype not available (AHK2) Topic is solved

The nature of the String prototype is explicitly documented under Primitive Values , which includes some "polyfill" to define the classes. The classes do not exist yet, because there'd be no point defining them if they're never exposed to script. I think I was deferring it because I wasn't sure I w...
by madsounds
12 Jul 2020, 11:18
Forum: AutoHotkey v2 Help
Topic: String prototype not available (AHK2) Topic is solved
Replies: 8
Views: 2501

Re: String prototype not available (AHK2) Topic is solved

swagfag wrote:
12 Jul 2020, 11:10

Code: Select all

%{}.GetMethod('DefineMethod')%(''.Base, "IsBlank", (str) => str ~= "^\s*$")
%{}.GetMethod('DefineProp')%(''.Base, "Length", { get: (str) => StrLen(str) } )
Omg so complex :D Thanks for solution and optimization 8-)
by madsounds
12 Jul 2020, 11:11
Forum: Ask For Help
Topic: 25 million variables in my script
Replies: 6
Views: 4256

Re: 25 million variables in my script

Perhaps it is more reasonable to use arrays instead of usual variables.
by madsounds
12 Jul 2020, 11:04
Forum: Ask For Help
Topic: DllCall w/o function name Topic is solved
Replies: 3
Views: 981

Re: DllCall w/o function name Topic is solved

Okay thank you guys!
by madsounds
12 Jul 2020, 10:58
Forum: AutoHotkey v2 Help
Topic: String prototype not available (AHK2) Topic is solved
Replies: 8
Views: 2501

String prototype not available (AHK2) Topic is solved

How to define new method/property in String class in AHK2? This code results with "This variable has not been assigned a value. Specifically: String". String_IsBlank( str ) { if str ~= "^\s*$" { return true } return false } String.Prototype.DefineMethod( "IsBlank", (str) => String_IsBlank(str) ) Str...
by madsounds
29 Jun 2020, 13:05
Forum: Ask For Help
Topic: DllCall w/o function name Topic is solved
Replies: 3
Views: 981

DllCall w/o function name Topic is solved

Now I'm trying to convert Webapp.ahk library to AHK2, and I found a strange line:

Code: Select all

r := DllCall( NumGet(NumGet(1 * pipa) + 5 * A_PtrSize)
            , "ptr", pipa
            , "ptr", &kMsg )
Why first parameter is a number and not a string containing function name?
by madsounds
19 Jun 2020, 02:40
Forum: AutoGUI
Topic: AutoGUI - Script Editor, GUI Designer, Debugger and Tools
Replies: 383
Views: 274150

Re: AutoGUI - Script Editor, GUI Designer, Debugger and Tools

- Make sure you are running an unmodified version of AutoGUI. You may need to extract the files again to a new location. Also make sure that the settings file (AutoGUI.ini) is being saved in the program folder, otherwise it is on %APPDATA%. - Replace the function __SendEditor in Scintilla.ahk with ...

Go to advanced search