Search found 57 matches

by GollyJer
03 Jun 2019, 20:56
Forum: Ask For Help
Topic: Sending email with AHK Topic is solved
Replies: 32
Views: 6643

Re: Sending email with AHK Topic is solved

If you want to send email without creating a file look into the .NET Framework Interop approach. Here's a link directly to a gmail solution here on the forums. For access to your gmail account you have to go to https://myaccount.google.com/security > App Passwords > Signing Into Google. From there, ...
by GollyJer
30 Apr 2018, 11:33
Forum: Ask For Help
Topic: Is it possible to make nested properties? Topic is solved
Replies: 4
Views: 493

Re: Is it possible to make nested properties? Topic is solved

Thanks again lexikos . I actually spent a few hours reading through the Pseudo-Properties Object docs and messing around with that exact approach last night. The docs for AHK are amazing. My goal is to start making my code reusable by others in intuitive ways. This forces me to more deeply understan...
by GollyJer
30 Apr 2018, 09:50
Forum: Ask For Help
Topic: #Include file "test.ahk" cannot be opened. Topic is solved
Replies: 6
Views: 893

Re: #Include file "test.ahk" cannot be opened. Topic is solved

#include <headername> is standard C++ syntax. Using #include libname for this purpose would be less standard, not more. ;) Ha! Makes sense. I've been writing React/ES6 Javascript and Python for the last year. I've never even looked at C++ code beyond perusing your AHK GitHub repo. :) #Include FileO...
by GollyJer
29 Apr 2018, 19:49
Forum: Ask For Help
Topic: #Include file "test.ahk" cannot be opened. Topic is solved
Replies: 6
Views: 893

Re: #Include file "test.ahk" cannot be opened. Topic is solved

Wow. I must have tried everything except literally putting the <> around the name.

Why can't AHK be more standard here?
It would be more obvious if you could just #Include filename. :)

Thanks Masonjar13 :!:
by GollyJer
29 Apr 2018, 18:19
Forum: Ask For Help
Topic: Is it possible to make nested properties? Topic is solved
Replies: 4
Views: 493

Re: Is it possible to make nested properties? Topic is solved

Yeah... that makes sense now that I think about it. Thanks! :)

This is probably the correct way to do it huh?

Code: Select all

Class Texty {

	Class SelectedText {
		Value[] {
			Get {
				Return Clip()
			}
		}
		Length[] {
			Get {
				Return StrLen(this.Value)
			}
		}
	}
}
by GollyJer
29 Apr 2018, 18:04
Forum: Ask For Help
Topic: #Include file "test.ahk" cannot be opened. Topic is solved
Replies: 6
Views: 893

#Include file "test.ahk" cannot be opened. Topic is solved

I have the following test file in Standard Lib . MsgBox, "hi from test.ahk" test_msg() { MsgBox, % "hi from test_msg()" } From another script, if I... - call test_msg I get the message box. I assume this means the Standard Lib functionality is working. - #Include c:/path/to/lib/test.ahk I get the me...
by GollyJer
29 Apr 2018, 16:57
Forum: Ask For Help
Topic: Is it possible to make nested properties? Topic is solved
Replies: 4
Views: 493

Is it possible to make nested properties? Topic is solved

I'd like to be able to call Texty.SelectedText and Texty.SelectedText.Length.

How :?:

Code: Select all

Class Texty {

	SelectedText[] {
		Get {
			Return Clip() 
		}
		
		; not a valid getter/setter.
		; Length[] {
		; 	Get {
		; 		Return StrLen(this.SelectedText)
		; 	}
		; }
	}
}
by GollyJer
28 Apr 2018, 01:03
Forum: Scripts and Functions
Topic: Spotify PostMessage Library
Replies: 22
Views: 3603

Re: Spotify PostMessage Library

Thanks for the reply. I ended up using the "V2" scripts provided by just me in this thread . He's done some amazing work there. :clap: With his tools I was able to get the path. But now I'm unable to get a handle on the object. None of the "FromPath" functions in any of the Acc scripts seem to work....
by GollyJer
27 Apr 2018, 17:14
Forum: Scripts and Functions
Topic: Spotify PostMessage Library
Replies: 22
Views: 3603

Re: Spotify PostMessage Library

Hi jeeswig. With Spotify's recent update they've somehow managed to hide the top level window from Acc_Viewer.
Is there a way to get the view Show Acc Structure button to show all parents in addition to children?
by GollyJer
26 Apr 2018, 11:26
Forum: Ask For Help
Topic: What gotcha am I missing with this approach to importing via the "Libraries of Functions" auto-include?
Replies: 2
Views: 336

Re: What gotcha am I missing with this approach to importing via the "Libraries of Functions" auto-include?

Thanks for the extra detail on library includes Masonjar13. It should be detailed that well in the docs. :) However, it is a pretty big problem for continuity. Lets say someone looks at your code for the first time, or you look back at some old code using this method. When you set Test, there isn't ...
by GollyJer
25 Apr 2018, 21:52
Forum: Ask For Help
Topic: What gotcha am I missing with this approach to importing via the "Libraries of Functions" auto-include?
Replies: 2
Views: 336

What gotcha am I missing with this approach to importing via the "Libraries of Functions" auto-include?

I've always organized my code into separate files and used #include statements (require specific paths) or MyFIle_myFunction syntax (clunky) for auto-included lib files. Today I decided I wanted to make it simpler. After reading the Library of Functions documentation more closely I found the followi...
by GollyJer
25 Apr 2018, 20:25
Forum: General Discussion
Topic: A Github organisation for ahkscript
Replies: 207
Views: 91145

Re: A Github organisation for ahkscript

Hi jeodf. Please invite me.

Thanks!
by GollyJer
27 Feb 2018, 13:24
Forum: Ask For Help
Topic: [solved] How to detect Calculator on Windows 10
Replies: 19
Views: 7740

Re: [solved] How to detect Calculator on Windows 10

Sorry to bump an old post but I was messing around with this today and came up with a simpler solution. Maybe multiple criteria in WinExist is new since this post was created? This works without the WinGetActiveProcessName function. DetectCalculator() { calc_id := WinExist("Calculator ahk_class Appl...
by GollyJer
26 Feb 2018, 16:07
Forum: Ask For Help
Topic: Standard Lib files don't run Auto Execute section when loaded?
Replies: 6
Views: 485

Re: Standard Lib files don't run Auto Execute section when loaded?

Sweet! Glad to know this is documented in more places jeeswg. For further completeness, I didn't really like the look of Browser_exists in my code. In the end I went with a third option... instantiating a global Browser class when Browser.ahk is executed. global Browser = New BrowserClass Class Brow...
by GollyJer
26 Feb 2018, 13:42
Forum: Ask For Help
Topic: Standard Lib files don't run Auto Execute section when loaded?
Replies: 6
Views: 485

Re: Standard Lib files don't run Auto Execute section when loaded?

I couldn't let this go and googled around some more. Eventually found a way that works pretty well. It's outlined by Lexikos here: Static init functions (was: Goto Eof) For completeness here's the code. I'm assuming this works because of static variable hoisting. init_Browser() { static _ := init_Br...
by GollyJer
26 Feb 2018, 13:17
Forum: Ask For Help
Topic: Standard Lib files don't run Auto Execute section when loaded?
Replies: 6
Views: 485

Re: Standard Lib files don't run Auto Execute section when loaded?

Hi Xtra! Thanks! I ended up with almost the same concept. Was hoping there was something a little cleaner... but it works! :-D Browser_winExist() { LoadBrowserAppGroup() return WinExist("ahk_group BrowserApps") } Browser_isActive() { LoadBrowserAppGroup() return WinActive("ahk_group BrowserApps") } ...
by GollyJer
26 Feb 2018, 12:48
Forum: Ask For Help
Topic: Standard Lib files don't run Auto Execute section when loaded?
Replies: 6
Views: 485

Standard Lib files don't run Auto Execute section when loaded?

I'm trying to create a simple "Browser" library. Basically, I want my other scripts to be able to tell if any one of a group of browsers is open or active with a simple function call. Browser.ahk ; Create BrowserApps group for batch browser actions. GroupAdd BrowserApps, ahk_exe firefox.exe GroupAdd...
by GollyJer
24 Feb 2018, 11:08
Forum: Scripts and Functions
Topic: LoadFile - Load script file as a separate process
Replies: 13
Views: 4105

Re: LoadFile - Load script file as a separate process

I stumbled on this the other day and would love to use this concept in my scripts. But, I'm am having a hard time getting a simple example working. Here's the file I'm loading with LoadFile . Hi() { MsgBox, "hi!" } And here's the file doing the loading. #SingleInstance force #NoEnv Say := LoadFile(A...
by GollyJer
04 Dec 2017, 10:47
Forum: Offtopic
Topic: AHKathon! [AHK Hackathon] 12/17
Replies: 80
Views: 12932

Re: AHKathon! [AHK Hackathon] 12/17

I am so confused.

Go to advanced search