Search found 104 matches

by colt
Yesterday, 10:48
Forum: Ask For Help
Topic: Dynamic hotkey creation or hotkey range
Replies: 1
Views: 62

Re: Dynamic hotkey creation or hotkey range

I ended up creating a label and attaching it to multiply hotkeys. rows := 7 loop %rows% { IniRead,edit%A_index%,backup.ini,test,edit%A_index%,Default %A_index% TEST } loop %rows% { Gui, Add, Text, w50 x10 y+5, ^%A_index% : cellContents := edit%A_index% Gui, Add, Edit,gedit y+-15 vctl%A_index% Upperc...
by colt
Yesterday, 10:30
Forum: Ask For Help
Topic: Dynamic hotkey creation or hotkey range
Replies: 1
Views: 62

Dynamic hotkey creation or hotkey range

I have a gui with variable amount of controls. I would like a hotkey corresponding to each control starting at ^1 and ending at ^n where n is the number of controls. Is it possible to specify a range for a hotkey to trigger? rows := 7 loop %rows% { IniRead,edit%A_index%,backup.ini,test,edit%A_index%...
by colt
19 Jun 2019, 14:07
Forum: Ask For Help
Topic: String with "quotation mark" - create array Topic is solved
Replies: 5
Views: 168

Re: String with "quotation mark" - create array Topic is solved

You could do something like this. StringVar = 302,"Emelie","174,50" newDelimiter := "$newDelim$" ;replace first two commas with new delimiter StringVar := strReplace(StringVar,",",newDelimiter,,2) msgbox % StringVar ;split using new delimter aString := StrSplit(StringVar,newDelimiter, " `t`n`r""""")...
by colt
19 Jun 2019, 13:01
Forum: Ask For Help
Topic: String with "quotation mark" - create array Topic is solved
Replies: 5
Views: 168

Re: String with "quotation mark" - create array Topic is solved

Change

Code: Select all

Delim := ","
to

Code: Select all

Delim := ""","""
by colt
17 Jun 2019, 15:19
Forum: Ask For Help
Topic: Detect colors similar to another color?
Replies: 13
Views: 534

Re: Detect colors similar to another color?

targetColor is stored as a hex value of 0x1d5f85 or 0xRRGGBB where RR can be interpreted as an integer between 0-255 substr(targetColor,3,2) will return the red value of your rgb color that is stored in hex form. In your case it will return 1d. The format command takes that hex value and converts it...
by colt
17 Jun 2019, 14:03
Forum: Ask For Help
Topic: Detect colors similar to another color?
Replies: 13
Views: 534

Re: Detect colors similar to another color?

Split the pixel color into rgb integers. Split your check color into rgb integers. Then calculate a 3d distance using rgb as 3D coordinates. Then specify a tolerance. If the distance is less than tolerance then the pixel color is close enough to your target color. z:: ; Z hotkey. targetColor=0x1d5f8...
by colt
14 Jun 2019, 14:24
Forum: Ask For Help
Topic: ActiveX Trigger Event When Page Changes Topic is solved
Replies: 4
Views: 249

Re: ActiveX Trigger Event When Page Changes Topic is solved

If the html change causes a status bar change, you could set up an event handler on StatusTextChange.
by colt
14 Jun 2019, 13:37
Forum: Ask For Help
Topic: How to open file and write lines at beginning and end? Topic is solved
Replies: 2
Views: 103

Re: How to open file and write lines at beginning and end? Topic is solved

Code: Select all

fileread,contents,%filePath%
fileDelete, %filePath%
fileappend, loop{`n%contents%`n},%filePath%
by colt
14 Jun 2019, 12:30
Forum: Ask For Help
Topic: How to build a Panic button on a Loop? Topic is solved
Replies: 5
Views: 292

Re: How to build a Panic button on a Loop? Topic is solved

Here is an example script. The f12 hotkey with exitApp will kill your script at any time. F11 will use the panic variable method to break the first loop. panic := false loop { sleep 50 tooltip % "loop triggered by autoexecute " . A_index if(panic) { break } } ;end of auto execute return f11:: painic...
by colt
13 Jun 2019, 09:09
Forum: Ask For Help
Topic: How to store variables outside a function ? Topic is solved
Replies: 4
Views: 178

Re: How to store variables outside a function ? Topic is solved

Is this how it should work? ;do not put % around input vars ClickPosition("Invoicenumber", "Please click the invoice number", PosX, PosY) ;use byref. that way the function will be operating on the input variable directly ClickPosition(title, text, byref OVarX,byref OVarY) { MsgBox, 4096, %title%, %t...
by colt
12 Jun 2019, 23:01
Forum: Ask For Help
Topic: Advice on interfacing with external code.
Replies: 0
Views: 106

Advice on interfacing with external code.

I have created a program in c that parses and edits certain pixels on a bitmap, then does cluster analysis, and finally returns a pointer to a list of cluster centroids and respective volumes. I was hoping to use gdip to create a bitmap and then pass the pointer of that bitmap to mcode through dll c...
by colt
12 Jun 2019, 17:28
Forum: Ask For Help
Topic: Way to control CMD in reliable way (like using COM) Topic is solved
Replies: 2
Views: 169

Re: Way to control CMD in reliable way (like using COM) Topic is solved

Look at this thread it was really helpful for me. https://autohotkey.com/board/topic/100322-run-a-program-get-output-as-a-string/
You are going to want to use shell.exec to create the cmd, StdIn.WriteLine() to give input, and StdOut.readall() to read its response.
by colt
11 Jun 2019, 19:57
Forum: Ask For Help
Topic: Mcode failing dynamic memory allocation.
Replies: 3
Views: 208

Re: Mcode failing dynamic memory allocation.

First of all, thanks for writing that tutorial, I definitely wouldn't have made it this far without it. I read up on function pointers today. Are you suggesting passing the location of malloc function through the dll call as a parameter? Then I could create a function pointer referencing that parame...
by colt
11 Jun 2019, 18:26
Forum: Ask For Help
Topic: GUI New Tab Not Working
Replies: 1
Views: 90

Re: GUI New Tab Not Working

How is this? hr := 8 counters:={} timeSlots := 8 startTime := 930 ;build array to store times and counts for each hour loop % timeSlots { counters[A_Index,"st"] := startTime counters[A_Index,"et"] := startTime + 100 counters[A_Index,"count"] := 0 startTime += 100 } Counter = 0000 ; Start counter at ...
by colt
11 Jun 2019, 16:59
Forum: Ask For Help
Topic: How to build a Panic button on a Loop? Topic is solved
Replies: 5
Views: 292

Re: How to build a Panic button on a Loop? Topic is solved

Edit your loops to include break out statements that are triggered with a hotkey

Code: Select all

;change break condition
if (pColor = "0xCCCCCC"||panic) 
{
    break
}
;or add break statement
if (panic) 
{
    break
}

;add hotkey 
esc::
	panic := true
return

;or
f12::
	exitapp ;closes program
return
by colt
11 Jun 2019, 01:13
Forum: Ask For Help
Topic: Mcode failing dynamic memory allocation.
Replies: 3
Views: 208

Mcode failing dynamic memory allocation.

Can mcode do dynamic allocation or is it constrained to a predetermined memory space? Trying to get the following to run with MCode4GCC and mingw but malloc doesn't return a good pointer. McodeTest := Mcode("2,x86:VYnlg+woxwQkDAAAAOgAAAAAiUX0i0X0ycOQkA==") msgbox % "result :" . DllCall(McodeTest ,"c...
by colt
07 Jun 2019, 20:05
Forum: Ask For Help
Topic: Running shell.exec in parallel with script
Replies: 0
Views: 100

Running shell.exec in parallel with script

I am trying to do a file search using shell.exec while running autohotkey code in parallel. Currently I am outputting to a temp file to get parallel behavior. Ideally, the main script would read the output of shell.exec using stdout when convenient. However, the program behaves like the shell script...
by colt
05 Jun 2019, 01:00
Forum: Ask For Help
Topic: Accessing bitmap stored by gdip Topic is solved
Replies: 2
Views: 201

Re: Accessing bitmap stored by gdip Topic is solved

Thanks for the guidance. Half the battle is to know what to search for. I found your discussion here https://www.autohotkey.com/boards/viewtopic.php?t=59063&p=248708 very helpful. The code below seems to work pretty well but there is a slow memory leak. start := a_tickcount startDrawGDIP() clearDraw...
by colt
03 Jun 2019, 22:04
Forum: Ask For Help
Topic: Accessing bitmap stored by gdip Topic is solved
Replies: 2
Views: 201

Accessing bitmap stored by gdip Topic is solved

I have some c code that loops over a bitmap that was loaded using file read. Does gdi+ store the image in memory as bitmap form at all times, or does it only generate the bitmap when Gdip_SaveBitmapToFile is called? If the bitmap does exist, how do you find the pointer to the actual pixel data? Righ...
by colt
31 May 2019, 00:44
Forum: Ask For Help
Topic: Cycle mouse cursor through multiple monitors
Replies: 1
Views: 103

Re: Cycle mouse cursor through multiple monitors

Something like this maybe. You will need two other hotkeys though. screenWidth := A_ScreenWidth SysGet, VirtualWidth, 78 ^Space:: ;moves to right CoordMode, Mouse, Screen ; This is needed to assure that you get your mouse coordinates related to the screen, not to the window MouseGetPos, MouseX, Mous...

Go to advanced search