Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with rget and ini file (see attached ini)
#1
I have this weird problem, I created an application that uses the attached ini file but when using rget nothing gets retrieved from the attached ini file.
Something is not right with the attached .ini file. (it has no virus!!!)

I looked in the properties of the file and user rights but all seems to be ok.
When I copy the contents of the attached ini file and then rename the ini file and create a new .ini file called "settings.ini" at the same location and paste (and save) the contents in there...below script works! (???)

Is there something I overlooked? (I bet I overlooked something ...)


Macro Macro53
Code:
Copy      Help
str- ini_pth="d:\settings.ini"
if(!FileExists(ini_pth 0))
,out F"Could not locate ini file:[]{ini_pth}"
,end

;; output contents ini file
;_s.getfile(ini_pth);out _s

str- ini_start_small
str- ini_fm_path
str- ini_fm_arg_open_currentab
str- ini_fm_arg_open_leftnewtab
str- ini_fm_arg_open_righttnewtab
str- ini_fm_arg_open_left
str- ini_fm_arg_open_right
str- ini_icn_tool_path
str- ini_icn_tool_arg
str- ini_icn_newicon_folder_path
;

rget ini_start_small "ini_start_small" "settings" ini_pth
rget ini_fm_path "ini_fm_path" "settings" ini_pth
rget ini_fm_arg_open_currentab "ini_fm_arg_open_currentab" "settings" ini_pth
rget ini_fm_arg_open_leftnewtab "ini_fm_arg_open_leftnewtab" "settings" ini_pth
rget ini_fm_arg_open_righttnewtab "ini_fm_arg_open_righttnewtab" "settings" ini_pth
rget ini_fm_arg_open_left "ini_fm_arg_open_left" "settings" ini_pth
rget ini_fm_arg_open_right "ini_fm_arg_open_right" "settings" ini_pth
rget ini_icn_tool_path "ini_icn_tool_path" "settings" ini_pth
rget ini_icn_tool_arg "ini_icn_tool_arg" "settings" ini_pth
rget ini_icn_newicon_folder_path "ini_icn_newicon_folder_path" "settings" ini_pth

out ini_start_small
out ini_fm_path
out ini_fm_arg_open_currentab
out ini_fm_arg_open_leftnewtab
out ini_fm_arg_open_righttnewtab
out ini_fm_arg_open_left
out ini_fm_arg_open_right
out ini_icn_tool_path
out ini_icn_tool_arg
out ini_icn_newicon_folder_path


Attached Files
.zip   settings.zip (Size: 355 bytes / Downloads: 257)
#2
I checked the file and noticed it was encoded with UTF-8-BOM when i changed it utf-8 it worked. Looks like it was the byte order mark causing the issue

also there is a mistake in your code on the last rget statement

change

Code:
Copy      Help
rget ini_icn_newicon_folder_path "ini_icn_newicon_folder_path" "settings" ini_pth

to

Code:
Copy      Help
rget ini_icn_newicon_folder_path "ini_icn_newicon_path" "settings" ini_pth
#3
Thank you!!!
This was driving me nuts!!!
#4
ya BOM will do that to ya lol

BOM is why i use notepad++ instead
#5
Thanks for that mistake heads-up!!!


Forum Jump:


Users browsing this thread: 1 Guest(s)