GUI move pic function

Get help with using AutoHotkey and its commands and hotkeys
Trigg
Posts: 70
Joined: 07 Apr 2017, 19:43

GUI move pic function

15 Jul 2017, 22:23

Before I tried making this into a function.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus




EDIT for function:
I cannot seem to get PostMessage to work with my GUI pictures inside of a function.

I'm trying to hold the RButton to move a picture, and I'm vaguely new to using this method.

No matter what I try to do, I can't get PostMessage to work in this function.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Last edited by Trigg on 18 Jul 2017, 12:05, edited 9 times in total.
User avatar
Masonjar13
Posts: 904
Joined: 20 Jul 2014, 10:16
GitHub: Masonjar13
Location: Не Россия

Re: GUI move pic and save pos

15 Jul 2017, 22:42

See GuiControlGet and note that the INI key for the first IniWrite after the GuiClose is incorrect, should be Pic1x.

There's a great number of ways you can save data to disk for later, and INI's are the typically the easiest to work with in AHK, but they do have character limits per value (around 2^16-1). Not that you'll exceed that in this case.
Trigg
Posts: 70
Joined: 07 Apr 2017, 19:43

Re: GUI move pic and save pos

16 Jul 2017, 12:13

Masonjar13 wrote:See GuiControlGet and note that the INI key for the first IniWrite after the GuiClose is incorrect, should be Pic1x.

There's a great number of ways you can save data to disk for later, and INI's are the typically the easiest to work with in AHK, but they do have character limits per value (around 2^16-1). Not that you'll exceed that in this case.



Thank you! And I know, I just want to keep it easy for now :) but I will definitely change it in the future.

And thanks for finding that mistake for me!
garry
Posts: 888
Joined: 22 Dec 2013, 12:50

Re: GUI move pic and save pos

17 Jul 2017, 05:15

thank you
how can I move pictures inside GUI ?

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

Trigg
Posts: 70
Joined: 07 Apr 2017, 19:43

Re: GUI move pic and save pos

17 Jul 2017, 10:44

garry wrote:thank you
how can I move pictures inside GUI ?


Choose 1-3 in the dropdownlist. and you hit any arrow key to start moving the picture. CTRL + arrow key will be more precise and goes by 1 pixel. After pressing an arrow key you can use your mouse to move the GUI picture.
Last edited by Trigg on 18 Jul 2017, 07:11, edited 1 time in total.
Trigg
Posts: 70
Joined: 07 Apr 2017, 19:43

Re: GUI move pic function

18 Jul 2017, 09:46

I changed the function a little by adding GuiControlGet, but PostMessage still does not work.

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

garry
Posts: 888
Joined: 22 Dec 2013, 12:50

Re: GUI move pic function

20 Jul 2017, 10:24

thank you Trigg
with RBUTTON seems to work , just not get the X/Y position from the picture after moved

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Exaskryz, nigelle, Nightwolf85, Shoal, Xeo786 and 44 guests