Sign in to follow this  
Followers 0
NiitriiX

included reg file (error: unable to parse line) ... help

9 posts in this topic

#1 ·  Posted (edited)

so the script is as simple as it can be...i include a .reg file but when i test with F5 it wont run, nore can i compile it ... i'm lost.

#include <soundsoff.reg>
runwait("regdit","soundsoff.reg",0)

and this is the error i get:

C:Documents and SettingsAdministratorMy Documentssoundsoff.reg (3) : ==> Missing separator character after keyword.:

[HKEY_CURRENT_USERSoftwaresoundsoff]

[HKEY_CURRENT_USER^ ERROR

when i try to compile it said:

error: unable to parse line

either a fix or another way of doing this would be great :D ... the .reg file needs to be compiled within the .exe file

Edited by NiitriiX

Share this post


Link to post
Share on other sites



I have just tried other reg files and all give me the same error :D

Share this post


Link to post
Share on other sites

NiitriiX,

Using #include just adds the text of the reg file to your script - what you need to do is to use FileInstall to save a copy of the reg file to disk and then run regedit using that file as the argument. :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

thnx for the reply Melba23,

However i had tried: FileInstall("soundsoff.reg","",0)

but when i try to compile it i got this error:

invalid fileinstall() function:

soundsoff.reg

any sugestions??

Share this post


Link to post
Share on other sites

NiitriiX,

You are missing the "dest" parameter for a start - how is AutoIt to know where you want it to put the file? :D

Other than that, was the "source" file in the same folder as the script? Please post the code you used and we will see what we can do. :huh:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

facepalm ... i had and unfinshed fileinstll at the end of the script :D ...

the script

fileinstall(

LOL

ok so the error is sorted now, but when compiled, the script works but the reg key does not merge to the registry...

FileInstall("soundsoff.reg","c:tempsoundsoff.reg",0)
runwait("regedit.exe","c:tempsoundsoff.reg",0)
sleep(6000)
FileDelete("c:tempsoundsoff.reg")
Edited by NiitriiX

Share this post


Link to post
Share on other sites

NiitriiX,

I see you have edited the code in your first post - most of it was missing beforehand. Look at the "RunWait" line - you have the filename in the "workingdir" space. :D

Try something like this: :huh:

runwait("regdit soundsoff.reg", @ScriptDir, @SW_HIDE)

then you should at least get regedit to run the file. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

thanx mate,

i managed to get it working like this:

runwait("REGEDIT /S c:tempsoundsoff.reg")

Share this post


Link to post
Share on other sites

NiitriiX,

Excellent - glad I could help. :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0