Need some help with my script please!
I can paste the data from clipboard, but on submit/START FileAppend does not read/use the data from the fields MyEditControl2 and MyEditControl1.
What am I doing wrong?
Thank you!
Code: Select all
#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines, -1
Gui, MyGUI:Font, s10 cNavy wBold,
Gui, MyGUI:Add, Text, x10 y10 w200 h16 , ADDRESS
Gui, MyGUI:Add, Edit, x10 y30 w500 h30 vMyEditControl2 hwndMyEditControlID1,
Gui, MyGUI:Add, Button, x520 y30 w200 h30 gPaste1, Paste
Gui, MyGUI:Add, Text, x10 y70 w200 h16 , NAME
Gui, MyGUI:Add, Edit, x10 y90 w500 h30 vMyEditControl1 hwndMyEditControlID1,
Gui, MyGUI:Add, Button, x520 y90 w200 h30 gPaste2, Paste
Gui, MyGUI:Font, s16 wBold,
Gui, MyGUI: Add, Button, x10 y130 w710 h40 gButtonOK, START
Gui, MyGUI:Font, s10 cNavy,
Gui, MyGUI:Add, Text, x400 y180 w100 h20 , Helper
Gui, MyGUI:Show, x765 y246 h200 w800, Helper
Return
ButtonOK:
Gui MyGUY: Submit
Goto, Insert
Paste1:
GuiControl, MyGUI:, MyEditControl2, % clipboard
return
Paste2:
GuiControl, MyGUI:, MyEditControl1, % clipboard
return
Insert:
FileDelete, details.json
FileAppend, {`n "settings": {`n "key": "%MyEditControl2%"`, `n "server": "%MyEditControl1%"`n }`, `n "type": "custom"`n}, details.json
GuiClose:
ExitApp