Search found 420 matches

by Sabestian Caine
25 May 2019, 13:41
Forum: Ask For Help
Topic: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?
Replies: 11
Views: 818

Re: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?

Gui, Add, Edit, vEdit w200 Gui, Show OnMessage(0x102, "WM_CHAR") return WM_CHAR(wParam, lParam){ If(A_GuiControl = "Edit" and !RegExMatch(Chr(wParam), "^[-0-9\x08]$")) ; x08 is backspace Return false } esc:: ExitApp Excellent dear Odlanir.... This is what i was wanting ... Dear odlanir, I want one ...
by Sabestian Caine
24 May 2019, 15:35
Forum: Ask For Help
Topic: How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?
Replies: 11
Views: 818

How to restrict the input by user to Positive numbers, Zero and Negative numbers into edit box in a GUI?

Hello friends... Please look at these codes- Gui Add, Edit, x183 y57 w205 h51 number, Gui Add, Edit, x184 y128 w205 h51 number, Gui Add, Edit, x185 y199 w205 h51 number, Gui Show, w547 h338, Window Return in the above codes you can see that i have added number keyword in each edit box which means th...
by Sabestian Caine
24 May 2019, 02:32
Forum: Ask For Help
Topic: How to change the color of edit box which has input focus in GUI? Topic is solved
Replies: 15
Views: 1099

Re: How to change the color of edit box which has input focus in GUI? Topic is solved

Try this code: backColor := 0xFFFF00 Gui Add, Edit, x183 y57 w205 h51, Edit 1 Gui Add, Edit, x184 y128 w205 h51, Edit 2 Gui Add, Edit, x185 y199 w205 h51, Edit 3 OnMessage( 0x111, Func("WM_COMMAND").Bind(backColor) ) Gui Show, w547 h338, Window Return WM_COMMAND(clr, wp, lp) { static EN_SETFOCUS :=...
by Sabestian Caine
23 May 2019, 14:30
Forum: Ask For Help
Topic: How to change the color of edit box which has input focus in GUI? Topic is solved
Replies: 15
Views: 1099

Re: How to change the color of edit box which has input focus in GUI? Topic is solved

Hi Try this: backColor := 0xFFFF00 Gui Add, Edit, x183 y57 w205 h51 +hwndhEdit1, Edit 1 SetEditColor(hEdit1, backColor) Gui Add, Edit, x184 y128 w205 h51, Edit 2 Gui Add, Edit, x185 y199 w205 h51, Edit 3 OnMessage( 0x111, Func("WM_COMMAND").Bind(backColor) ) Gui Show, w547 h338, Window Return WM_CO...
by Sabestian Caine
22 May 2019, 00:35
Forum: Ask For Help
Topic: How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?
Replies: 4
Views: 354

Re: How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?

For the start you don't need much C++ knowledge, because for many of the plain Windows API functions some C knowlede is enough. You should start to learn about C data types, structures and data alignment. Then you need to know where to find the MS documentation. I frequently use the following links...
by Sabestian Caine
21 May 2019, 02:05
Forum: Ask For Help
Topic: How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?
Replies: 4
Views: 354

Re: How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?

With that message box example (and with most of autohotkey), although you use code similar to C,C++ you are actually calling the windows api. For example the regular msgbox for autohotkey just has the command to call on that api in a simple way. In c++ you have to access it manually, which is why t...
by Sabestian Caine
20 May 2019, 09:50
Forum: Ask For Help
Topic: How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?
Replies: 4
Views: 354

How to learn DllCall and more advanced stuff in AHK as there is no mention of Dll files and Windows API in C++?

Hello Friends.. I am using ahk since 2013. Although I am not from programming background, I am quite curious to learn ahk deeper. I want to learn more advanced stuff in ahk like dllcall. I am so impressed by ahk that i have started taking tuition for C, C++ and JAVA etc. In this tread it has been to...
by Sabestian Caine
19 May 2019, 14:07
Forum: Ask For Help
Topic: How to perform two different tasks when I press close buttons of two different GUIs created by same script? Topic is solved
Replies: 2
Views: 207

Re: How to perform two different tasks when I press close buttons of two different GUIs created by same script? Topic is solved

swagfag wrote:
19 May 2019, 06:13
change the second label to rGuiClose:
Thanks a lot dear swagfag... You really solved my problem... :clap: :bravo:

Thanks a lot sir... :thumbup: :salute:
by Sabestian Caine
19 May 2019, 05:36
Forum: Ask For Help
Topic: How to perform two different tasks when I press close buttons of two different GUIs created by same script? Topic is solved
Replies: 2
Views: 207

How to perform two different tasks when I press close buttons of two different GUIs created by same script? Topic is solved

Hello Friends... As far as I know GuiClose label is an inbuilt label which is associated with close button for any Gui window. NOW, suppose i have codes for two guis in same script and i want that when i press close button for first gui then it should show msgbox saying you pressed close button for ...
by Sabestian Caine
19 May 2019, 05:15
Forum: Ask For Help
Topic: How to change the color of edit box which has input focus in GUI? Topic is solved
Replies: 15
Views: 1099

Re: How to change the color of edit box which has input focus in GUI? Topic is solved

Hi Try this: backColor := 0xFFFF00 Gui Add, Edit, x183 y57 w205 h51 +hwndhEdit1, Edit 1 SetEditColor(hEdit1, backColor) Gui Add, Edit, x184 y128 w205 h51, Edit 2 Gui Add, Edit, x185 y199 w205 h51, Edit 3 OnMessage( 0x111, Func("WM_COMMAND").Bind(backColor) ) Gui Show, w547 h338, Window Return WM_CO...
by Sabestian Caine
19 May 2019, 05:14
Forum: Ask For Help
Topic: Best Text Editor for AHK?
Replies: 7
Views: 519

Re: Best Text Editor for AHK?

No doubt, the best editor for ahk is AHK Studio by Maestrith.

Check out this link-
https://the-automator.com/ahk-studio/
by Sabestian Caine
17 May 2019, 10:08
Forum: Ask For Help
Topic: How to change the color of edit box which has input focus in GUI? Topic is solved
Replies: 15
Views: 1099

How to change the color of edit box which has input focus in GUI? Topic is solved

Hello Friends, I have three edit boxes which looks like this- 17_05_19 @8_24_22 white.png the codes are these- Gui Add, Edit, x183 y57 w205 h51, Edit 1 Gui Add, Edit, x184 y128 w205 h51, Edit 2 Gui Add, Edit, x185 y199 w205 h51, Edit 3 Gui Show, w547 h338, Window Return Now I want that the color of ...
by Sabestian Caine
10 May 2019, 13:59
Forum: Ask For Help
Topic: How to change the color and font of a GUI button when I hover mouse pointer over it?
Replies: 7
Views: 644

Re: How to change the color and font of a GUI button when I hover mouse pointer over it?

have no answer for GDIP here just an example with 2 Buttons, if hover then CHANGE FONT ( GUI example for different screensize , not needed here ) #warn SetWorkingDir, %A_ScriptDir% wa:=A_screenwidth ha:=A_screenHeight Gui,2:-border Gui,2: -DPIScale SS_REALSIZECONTROL := 0x40 Gui,2:Color,Black,Black...
by Sabestian Caine
07 May 2019, 13:22
Forum: Ask For Help
Topic: How to change the color and font of a GUI button when I hover mouse pointer over it?
Replies: 7
Views: 644

Re: How to change the color and font of a GUI button when I hover mouse pointer over it?

[Class] ImageButton Thanks dear just me... Your this button class really helped me to create custom buttons. You are really great and awesome!!!!! Dear just me, is there any such kind of class or function by using that i can create custom edit boxes, radio buttons, check boxes, list view, progress ...
by Sabestian Caine
03 May 2019, 13:21
Forum: Ask For Help
Topic: How to change the color and font of a GUI button when I hover mouse pointer over it?
Replies: 7
Views: 644

Re: How to change the color and font of a GUI button when I hover mouse pointer over it?

Is there any help regarding it? What is gdip and Bitmap which are used again and again in above codes? please tell...
by Sabestian Caine
01 May 2019, 13:23
Forum: Ask For Help
Topic: How to change the color and font of a GUI button when I hover mouse pointer over it?
Replies: 7
Views: 644

How to change the color and font of a GUI button when I hover mouse pointer over it?

Please look at this gif- ram4.gif In above video you can see that when i bring cursor on any button then it changes the color of that button (perhaps slightly the font and color also). I want to know which part of the codes create such effect in GUI. In fact this is smart clicker program which is q...
by Sabestian Caine
27 Apr 2019, 15:02
Forum: Ask For Help
Topic: How to use __get, __set and __call meta functions in Classes?
Replies: 4
Views: 329

Re: How to use __get, __set and __call meta functions in Classes?

Hi Sabestian Caine , Based on my experience from using classes - only in ahk (moreover, the only language I know) - meta-functions are especially useful when your deal with derived classes especially when 1°'hooking' ( __Call ); 2°extending and thus enrich features interfaced by the object ( __Call...
by Sabestian Caine
22 Apr 2019, 12:43
Forum: Ask For Help
Topic: How to use __get, __set and __call meta functions in Classes?
Replies: 4
Views: 329

How to use __get, __set and __call meta functions in Classes?

Hello Friends.. I am trying to learn classes in AutoHotKey. I have learnt a lot of things in classes by these tutorials- https://www.autohotkey.com/boards/viewtopic.php?f=7&t=6177 https://www.autohotkey.com/boards/viewtopic.php?f=7&t=41332 https://autohotkey.com/boards/viewtopic.php?f=7&t=54588 http...
by Sabestian Caine
21 Apr 2019, 09:50
Forum: Ask For Help
Topic: I am unable to return multiple values form a function using ByRef in function parameter. Please help. Topic is solved
Replies: 7
Views: 542

Re: I am unable to return multiple values form a function using ByRef in function parameter. Please help. Topic is solved

Slightly off-topic: Instead of using ByRef parameters you might want to return an object: #NoEnv tom := new student sam := new student obj := new student tom.insert_marks(10, 20) ; I insert Tom's computer and English marks sam.insert_marks(30, 55) ; I insert Sam's computer and English marks retobj ...
by Sabestian Caine
21 Apr 2019, 09:49
Forum: Ask For Help
Topic: I am unable to return multiple values form a function using ByRef in function parameter. Please help. Topic is solved
Replies: 7
Views: 542

Re: I am unable to return multiple values form a function using ByRef in function parameter. Please help. Topic is solved

Note: I've called the class 'student' instead of 'students' to be less confusing. I'd do something like this: tom := new student sam := new student obj := new student tom.insert_marks(10, 20) ; I insert Tom's computer and English marks sam.insert_marks(30, 55) ; I insert Sam's computer and English ...

Go to advanced search