Posted by member 103440 on 2004-01-22 18:54:50
Hi! I'm driving nuts with this :(
I'm using textedit to change my theme flags, but i don't understand why it changes some flags and don't another’s. Here is the code:
script.rc
flags.rc
popuptheme.rc
When i change the BarIconsOn flag it works just fine, and then when i try to change the SideBarOn flag it does nothing! (The same happens with AmpControlsOn). I don't understand because the code it's the same, i just changed the var/bangs names in the script.
And can someone please tell me why my script.rc file changes every time i use the scripts for changing the flags?
I'm using textedit to change my theme flags, but i don't understand why it changes some flags and don't another’s. Here is the code:
script.rc
;------------------------------------------------------------------------------
; reload settings from disk and reload popup module
;------------------------------------------------------------------------------
*Script bang !RefreshSettings
*Script exec |Reload
*Script exec |ReloadModule "$ModulesDir$popup2-2.1.4.dll"
*Script ~bang
.........
;------------------------------------------------------------------------------
; bar icons script
;------------------------------------------------------------------------------
*Script bang !ToggleBarIcons
*Script gotoif ("$BarIconsOn$" = "true") BarIconsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BarIconsOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label BarIconsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BarIconsOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; big icons script
;------------------------------------------------------------------------------
*Script bang !ToggleBigIcons
*Script gotoif ("$BigButtonsOn$" = "true") BigButtonsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BigButtonsOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label BigButtonsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BigButtonsOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; sidebar script
;------------------------------------------------------------------------------
*Script bang !ToggleSidebar
*Script gotoif ("$BigButtonsOn$" = "true") SideOn_lbl [Here is my error instead of $BigButtonsOn$ should be $SideBarOn$ :(]
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(SideBarOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label SideOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(SideBarOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; Winamp Controls script
;------------------------------------------------------------------------------
*Script bang !ToggleWinampControls
*Script gotoif ("$AmpControlsOn$" = "true") AmpControlsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(AmpControlsOn *)false@ @\1true@
*Script exit
*Script label AmpControlsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(AmpControlsOn *)true@ @\1false@
*Script ~bang
; reload settings from disk and reload popup module
;------------------------------------------------------------------------------
*Script bang !RefreshSettings
*Script exec |Reload
*Script exec |ReloadModule "$ModulesDir$popup2-2.1.4.dll"
*Script ~bang
.........
;------------------------------------------------------------------------------
; bar icons script
;------------------------------------------------------------------------------
*Script bang !ToggleBarIcons
*Script gotoif ("$BarIconsOn$" = "true") BarIconsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BarIconsOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label BarIconsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BarIconsOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; big icons script
;------------------------------------------------------------------------------
*Script bang !ToggleBigIcons
*Script gotoif ("$BigButtonsOn$" = "true") BigButtonsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BigButtonsOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label BigButtonsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(BigButtonsOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; sidebar script
;------------------------------------------------------------------------------
*Script bang !ToggleSidebar
*Script gotoif ("$BigButtonsOn$" = "true") SideOn_lbl [Here is my error instead of $BigButtonsOn$ should be $SideBarOn$ :(]
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(SideBarOn *)false@ @\1true@
*Script exec |Reload
*Script exit
*Script label SideOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(SideBarOn *)true@ @\1false@
*Script exec |Reload
*Script ~bang
;------------------------------------------------------------------------------
; Winamp Controls script
;------------------------------------------------------------------------------
*Script bang !ToggleWinampControls
*Script gotoif ("$AmpControlsOn$" = "true") AmpControlsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(AmpControlsOn *)false@ @\1true@
*Script exit
*Script label AmpControlsOn_lbl
*Script exec |textreplace @$ConfigDir$flags.rc@ @^(AmpControlsOn *)true@ @\1false@
*Script ~bang
flags.rc
;------------------------------------------------------------------------------
; flags for various theme options - do NOT edit by hand, use theme cfg. menu
;------------------------------------------------------------------------------
BarOnTop false
VWMOn true
BarIconsOn true
AmpControlsOn true
UseJamptoo false
BigButtonsOn false
SideBarOn true
MaximizeOverBar false
GesturesOn true
GesturesCommandsOn true
; flags for various theme options - do NOT edit by hand, use theme cfg. menu
;------------------------------------------------------------------------------
BarOnTop false
VWMOn true
BarIconsOn true
AmpControlsOn true
UseJamptoo false
BigButtonsOn false
SideBarOn true
MaximizeOverBar false
GesturesOn true
GesturesCommandsOn true
popuptheme.rc
;------------------------------------------------------------------------------
; theme config. popup menu (SHIFT+left click on desktop)
;------------------------------------------------------------------------------
*Popup "$ThemeName$" !New !PopupTheme
*Popup "tasks" !PopupTasks
*Popup !Separator
*Popup "BottomBar Options" Folder
IF BarIconsOn
*Popup "Disable Bar Icons" !execute [!ToggleBarIcons][!Recycle]
IF NOT BigButtonsOn
*Popup "Enable Big Icons" !execute [!ToggleBigIcons][!Recycle]
ELSE
*Popup "Disable Big Icons" !execute [!ToggleBigIcons][!Recycle]
ENDIF
ELSE
*Popup "Enable Bar Icons" !execute [!ToggleBarIcons][!Recycle]
ENDIF
*Popup ~Folder
*Popup "Sidebar Options" Folder
IF SideBarOn
*Popup "Disable SideBar" !execute [!ToggleSidebar][!Recycle]
IF AmpControlsOn
*Popup "Disable Winamp Controls" !execute [!ToggleWinampControls][!Recycle]
ELSE
*Popup "Enable Winamp Controls" !execute [!ToggleWinampControls][!Recycle]
ENDIF
ELSE
*Popup "Enable SideBar" !execute [!ToggleSidebar][!Recycle]
ENDIF
*Popup ~Folder
*Popup !Separator
*Popup "Edit themevars.rc" !execute ["$TxtEditor$" "$ConfigDir$themevars.rc"]
*Popup ~New
; theme config. popup menu (SHIFT+left click on desktop)
;------------------------------------------------------------------------------
*Popup "$ThemeName$" !New !PopupTheme
*Popup "tasks" !PopupTasks
*Popup !Separator
*Popup "BottomBar Options" Folder
IF BarIconsOn
*Popup "Disable Bar Icons" !execute [!ToggleBarIcons][!Recycle]
IF NOT BigButtonsOn
*Popup "Enable Big Icons" !execute [!ToggleBigIcons][!Recycle]
ELSE
*Popup "Disable Big Icons" !execute [!ToggleBigIcons][!Recycle]
ENDIF
ELSE
*Popup "Enable Bar Icons" !execute [!ToggleBarIcons][!Recycle]
ENDIF
*Popup ~Folder
*Popup "Sidebar Options" Folder
IF SideBarOn
*Popup "Disable SideBar" !execute [!ToggleSidebar][!Recycle]
IF AmpControlsOn
*Popup "Disable Winamp Controls" !execute [!ToggleWinampControls][!Recycle]
ELSE
*Popup "Enable Winamp Controls" !execute [!ToggleWinampControls][!Recycle]
ENDIF
ELSE
*Popup "Enable SideBar" !execute [!ToggleSidebar][!Recycle]
ENDIF
*Popup ~Folder
*Popup !Separator
*Popup "Edit themevars.rc" !execute ["$TxtEditor$" "$ConfigDir$themevars.rc"]
*Popup ~New
When i change the BarIconsOn flag it works just fine, and then when i try to change the SideBarOn flag it does nothing! (The same happens with AmpControlsOn). I don't understand because the code it's the same, i just changed the var/bangs names in the script.
And can someone please tell me why my script.rc file changes every time i use the scripts for changing the flags?