Problem with iniread and variant Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ricardo231
Posts: 22
Joined: 24 Aug 2019, 16:14

Problem with iniread and variant

02 Sep 2019, 20:13

Hi, I have a question about using a variant with iniread, I'm using the FindText script which converts the image to text and detects it much faster than imageSearch.
https://www.autohotkey.com/boards/viewtopic.php?t=17834

This is the image converted into text that I want to have saved in an ini file.

Code: Select all

Text:="|<>*101$69.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzsVzzz07zzzzy6Dzzk0TzzzzbzzzwTnzzzzzztzz7z7zzzzzz7ztzwzzzz7zyTwS3lzzzszznzb0CDzzzbzyTwtwlzzzzzzzzXDaDzzzjzzzwtwlzzzwzznzbDaDzzzbzyTww1lzzzwzznzXkSDzzznzzk1DzbzzzyTyw00zszzzzzzn7wXyTzzzzsklzk03zzzzz4CTz80zzzzzzz7UwTzzzzzzzts7XzzzzzzzzCTwTzzzzzzztnS0EzzzzzzzC3k2DzzzzzztkzXzzzzzzzzDTSDwzzzzzzszvlzbzzzzzzUvzXyDzzzzyQ7byTlzzzzzV0wTnyDzzzzsQ1XyzvzzzzzDyADzzzzzzzzzXyyTtzzzzvzsDU3yDzzzyDz4s0Ttzzzzlzy40XzTzzzzTzk76TzzzzzzzzlwMnzzzzzTzw600TzzzzlzzUU27zzzzyDzwlslzzzzzszzbDCTzzzzzbzwltnzzzzzzzxaDCTzzzzzzz4ttnzzzzzzV3bUSTzzzzzyAQS7Xzzzzzzzzlztzzzzzzzzz7yDzzzzzzzzwNXzzzzzzzzzk1zzzzzzzzzz0Dzzzzzzzzzzzzzzzzzzzzzzzzzzw"
But when configuring everything gives error because when appearing the characters "$ * ." are not valid

Any way to save this in a separate file so that it can be modified from there?
User avatar
boiler
Posts: 17059
Joined: 21 Dec 2014, 02:44

Re: Problem with iniread and variant

02 Sep 2019, 21:01

ricardo231 wrote:
02 Sep 2019, 20:13
But when configuring everything gives error because when appearing the characters "$ * ." are not valid
When configuring what? What's giving you the error? AHK? Can you show the exact error message and describe when it occurs?

ricardo231 wrote: Any way to save this in a separate file so that it can be modified from there?
Do you just want to save it in a regular text file rather than an ini file? Just use the FileAppend command.
garry
Posts: 3772
Joined: 22 Dec 2013, 12:50

Re: Problem with iniread and variant  Topic is solved

03 Sep 2019, 09:12

a read/write-ini example for test / or use textfile

Code: Select all

#warn
#NoEnv
#SingleInstance force
filename1=IniTest
SetWorkingDir, %A_ScriptDir%
;-------------
e:="
(Ltrim Join`r`n
|<>*101$69.zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzsVzzz07zzzzy6Dzzk0TzzzzbzzzwTnzzzzzztzz7z7zzzzzz7ztzwzzzz7zyTwS3lzzzszznzb0CDzzzbzyTwtwlzzzzzzzzXDaDzzzjzzzwtwlzzzwzznzbDaDzzzbzyTww1lzzzwzznzXkSDzzznzzk1DzbzzzyTyw00zszzzzzzn7wXyTzzzzsklzk03zzzzz4CTz80zzzzzzz7UwTzzzzzzzts7XzzzzzzzzCTwTzzzzzzztnS0EzzzzzzzC3k2DzzzzzztkzXzzzzzzzzDTSDwzzzzzzszvlzbzzzzzzUvzXyDzzzzyQ7byTlzzzzzV0wTnyDzzzzsQ1XyzvzzzzzDyADzzzzzzzzzXyyTtzzzzvzsDU3yDzzzyDz4s0Ttzzzzlzy40XzTzzzzTzk76TzzzzzzzzlwMnzzzzzTzw600TzzzzlzzUU27zzzzyDzwlslzzzzzszzbDCTzzzzzbzwltnzzzzzzzxaDCTzzzzzzz4ttnzzzzzzV3bUSTzzzzzyAQS7Xzzzzzzzzlztzzzzzzzzz7yDzzzzzzzzwNXzzzzzzzzzk1zzzzzzzzzz0Dzzzzzzzzzzzzzzzzzzzzzzzzzzw
"
)
;-------------
Gui,2: Color, ControlColor,Black           ;- background from edit
Gui,2: Color, Gray                         ;- Gui color
Gui,2: Font,s12 cYellow ,Lucida Console    ;- font , font-size and color
xx:=a_scriptname
SplitPath, xx, name, dir, ext, name_no_ext, drive
RSSINI=%A_scriptdir%\%name_no_ext%_config.ini
ifnotexist,%rssini%
    IniWrite,%e%, %rssini% ,pic1 ,picture1
IniRead, val1, %rssini%, pic1 ,picture1
Gui,2: Add, Edit    , x10  y10 w1500 h200 vC1 ,%val1%
Gui,2: Add, Button  , x10  y250 w200 h27  gA1 ,READ_INI
Gui,2: Show         , x100 y10 w1570 h320,%filename1%
Guicontrol,2:Focus,C1
SendInput , {end}
e=
val1=
return
;-------------
2Guiclose:
Gui,2:submit,nohide
gosub,save1
exitapp
;-------------
;- for test
a1:
IniRead, val2, %rssini%, pic1 ,picture1
GuiControl,2:,C1,
sleep,2000
GuiControl,2:,C1,%val2%
val2=
return
;-------------
save1:
IniWrite, %C1%  , %rssini% ,Pic1  ,Picture1
return
;-------------


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 146 guests