IniWrite not writing... Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
kunkel321
Posts: 1194
Joined: 30 Nov 2015, 21:19

IniWrite not writing...

11 Apr 2017, 15:29

Hi All,
EDIT: My bad... See reply.
Christopher has released v4 of the most excellent Capture2Text. It's an OCR app and I'm trying to programatically alter the INI file that defines the whitelist (among other things). The following script should be updating the Capture2Text.ini file -- yes?

Code: Select all

^!+2::
;myWhiteList := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-.()=+"
myWhiteList := "56789"
; EDIT: move myIniLocation declaration to below the Label!!!
;myIniLocation := "C:\Users\swkunkel\AppData\Roaming\Capture2Text\Capture2Text.ini"
goto, WhitelistUpdate
return
^!2::
myWhiteList := ""
goto, WhitelistUpdate
WhitelistUpdate:
myIniLocation := "C:\Users\swkunkel\AppData\Roaming\Capture2Text\Capture2Text.ini" ;here!!!
Process, Close, Capture2Text.exe
Sleep, 250
IniWrite, %myWhiteList%, %myIniLoaction%, OCR, Whitelist
sleep, 1000
run, C:\Users\swkunkel\AutoHotkey\AutoCorrect\Capture2Text_v4.0_64bit\Capture2Text.exe
return
Here's a screenshot of that file:
Image

Thoughts?
(Open to other suggestions too. Such as better ways to use the labels or timers.)
Last edited by kunkel321 on 11 Apr 2017, 15:53, edited 2 times in total.
ste(phen|ve) kunkel
User avatar
kunkel321
Posts: 1194
Joined: 30 Nov 2015, 21:19

Re: IniWrite not writing...

11 Apr 2017, 15:31

Oh bloody hell... I just saw the typo in "location" !!!
ste(phen|ve) kunkel
User avatar
kunkel321
Posts: 1194
Joined: 30 Nov 2015, 21:19

Re: IniWrite not writing...

11 Apr 2017, 15:37

Yea, it's working now. Sorry about that. I swear I can never see my typos until AFTER I post them publicly. I even proof-read my post with the "preview" feature. Still, the second that I click "submit," then the answer jumps out at me. Anyway, by marking it as "done," you're referring to the checkmark button on the far right -- yes?

EDIT: Too weird... When I had that typo in my "iniWrite" ini location, erroneous files were getting written into the same directory as the script. The contents of each file is "[OCR]."
Can anyone read the file names?
Image
ste(phen|ve) kunkel

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: apeironn, Descolada, fiaztv1, JKJadan, Pianist and 210 guests