How do I use tuncay's libraries? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dxdy

How do I use tuncay's libraries?

20 Jun 2018, 04:04

Hi.
I found this:
https://github.com/dufferzafar/Autohotk ... master/lib
(tunkey's standard library) and would like to use it in a macro (hotkey to set current windows's affinity).

That's the code:

Code: Select all

#Include D:\Autohotkey\tuncay\Affinity.ahk

#^F1::
WinGet, var, PID, A
Affinity_Set( 1, var )
return
I am getting an error about PAM and SAM variables not having a value. What are these?
What's the best place I could store the library, so that #Include is not necessary?

Including this way:

Code: Select all

#Include D:\Autohotkey\tuncay
doesn't seem to work at al.
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: How do I use tuncay's libraries?

20 Jun 2018, 09:20

You have the include correct. It could for AHK v1.0?
Im not sure... I havent used this library before. After a quick search, you may want to try the code on this page?
http://www.donationcoder.com/forum/inde ... 2#msg60982
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
dxdy

Re: How do I use tuncay's libraries?

20 Jun 2018, 13:12

Hey, thanks for a reply.
I sorted this out.

The solution was...
..to disable warnings by replacing Warn with ;Warn. :P

I have another issue though.
I'd like to store a variable in memory, persistently. E.g. Windows+Ctrl+F1 changes x01 from 0 to 1.
Then, in another shortcut, I can use the x01 value.

By using F1 through F12 and x01 through x12, I could store the list of desired threads I want to give to the application, and set the affinity accordingly:
WIN+CTRL+F1: sets x01 to 1
WIN+CTRL+F2: sets x02 to 1
WIN+CTRL+F7: sets x07 to 1
WIN+CTRL+ENTER: reads x01, x02, x07 and gives active application first, second, and seventh thread.
User avatar
joedf
Posts: 8958
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: How do I use tuncay's libraries?  Topic is solved

20 Jun 2018, 20:02

I’m not sure what you mean by persistently .
Why not simply have the application running in the background and store it in a normal variable?

Code: Select all

#^F1::
; do stuff
Variable = 7
Return
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Ineedhelplz and 321 guests