Help with Search Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
MonuKashyap
Posts: 12
Joined: 06 Jun 2016, 21:32

Help with Search

09 Feb 2018, 01:51

I am making simple search program, and i m trying to kill current busy thread, and dont no how to do that.
any help please?

here's my script, in this script i want to make work the stop button.

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

User avatar
divanebaba
Posts: 626
Joined: 20 Dec 2016, 03:53
Location: Diaspora

Re: Help with Search

09 Feb 2018, 02:47

MonuKashyap wrote:... kill current busy thread ...
Could be helpful to know, what kind of thread you want to close.
Is it an AHK-tread? Is it same script you want to close, while you are reloading?
Or a damned game you want to play instead of doing usefull things? :mrgreen: :mrgreen:

[Starklichtbirne IQ >> 250!!] Dank deutscher Lehrerempfehlung, nur Süperdepp und Hartz4-Bezieher, statt Abitürient und Einkommensbezieher.
[Strong light bulb IQ >> 250!!] Thanks to german teacher's recommendation, willful and welfare recipient, instead of high school graduate and moneymaker.

Entering high school for foreign children is not prohibited in GERMANY, it's only made nearly impossible by government.
Virtually the only way - visiting high school abroad.
MonuKashyap
Posts: 12
Joined: 06 Jun 2016, 21:32

Re: Help with Search

09 Feb 2018, 06:37

divanebaba wrote:
MonuKashyap wrote:... kill current busy thread ...
Could be helpful to know, what kind of thread you want to close.
Is it an AHK-tread? Is it same script you want to close, while you are reloading?
Or a damned game you want to play instead of doing usefull things? :mrgreen: :mrgreen:


I Want to kill the loop by stop button which is present in the same script
and
if you didn't understand anything, simply run the script then you will definitely understand what i want to do.
and thanks for reply
Odlanir
Posts: 274
Joined: 20 Oct 2016, 08:20

Re: Help with Search

09 Feb 2018, 15:07

A workaround:

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

____________________________________________________________________________
Windows 7 Home Premium 64 bit - Autohotkey v1.1.24.02 64-bit Unicode
MonuKashyap
Posts: 12
Joined: 06 Jun 2016, 21:32

Re: Help with Search

11 Feb 2018, 01:00

Odlanir wrote:A workaround:

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





The whole code works!! But Only First Time.. AND with click only (need enter button too)
Then it needs to reload.
any more help??
MonuKashyap
Posts: 12
Joined: 06 Jun 2016, 21:32

Re: Help with Search  Topic is solved

11 Feb 2018, 02:46

Well,, Thank you all for replies.. I really appreciate your help and suggestion.
and
I found my solution in this code,-

gui, font, s20
gui, add, edit
gui, add, button, x10 y110 w100 gfind vSrchButton Default, Find
gui, add, button, x10 y110 w100 gstop vStopButton Default, Stop
Guicontrol, hide, StopButton
Guicontrol, disable, StopButton
gui, show
return

Stop:
Stop:=1
Guicontrol, hide, StopButton
Guicontrol, disable, StopButton
Guicontrol, Show, Srchbutton
Guicontrol, Enable, Srchbutton
tooltip
Return

Find:
Guicontrol, hide, Srchbutton
Guicontrol, disable, Srchbutton
Guicontrol, Show, StopButton
Guicontrol, Enable, StopButton
Stop:=0
loop
{
tooltip % a_Index "`n" count
if Stop
Break
}
msgbox done.
Return

esc::
guiclose:
exitapp



I found this trick by spending more time on goolge, ahk forum, and many more experiments...
Hope this trick helps you too for some task in future..
Thanks once again to everyone.
garry
Posts: 1205
Joined: 22 Dec 2013, 12:50

Re: Help with Search

11 Feb 2018, 03:39

thank you all for help
@MonuKashyap , this is your script below ( just used CODE for better readable and little modified as example for me to keep it ) , the variable 'count' was empty , can use if wanted ( here it's same as a_index )
added guicontrol for Edit
as title = How to start and break a loop with ONE button

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

Odlanir
Posts: 274
Joined: 20 Oct 2016, 08:20

Re: Help with Search

11 Feb 2018, 04:23

With minor mods the code I gave you works all the time, also with enter key.

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

____________________________________________________________________________
Windows 7 Home Premium 64 bit - Autohotkey v1.1.24.02 64-bit Unicode
garry
Posts: 1205
Joined: 22 Dec 2013, 12:50

Re: Help with Search

11 Feb 2018, 09:33

@Odlanir , thank you again for the good short example

Return to “Ask For Help”

Who is online

Users browsing this forum: kurkan and 34 guests