Old 04-25-2021, 11:37 AM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Script: Theme auto-refresher

Hi,


I'm not sure how themers out there handle theme refreshing after a rtconfig.txt modification,
Maybe the Lokasenna script to manually refresh ?


Anyway, I was a bit slow down by having to switch focus from code editor to reaper and press a shortcut to see changes for theme moding,


So I made a script:
  • X-Raym_Theme auto-refresher (background).lua




Just a simple save and it refresh REAPER theme, allowing me to see the modifications! ��


Shared for free in my reapack repo!



(Note: on the screenshot above, I use WindowStop software to be able to have my code editor always on top even if not focus. Code editor is sublime text with reasyntax for reaper theme file).


You just need to save the rtconfig.txt (uncompressed) and it will refresh the theme. No need to make actual changes to the file (for eg, if you have change one image, you can just save rtconfig.txt, and it will update the theme anyway).



Works on uncompressed theme only, obviously.



Hope it helps!


Thx to juliansader js_reascriptAPI free extension which bring the file last modification date support :P


---
side note: in case you missed it cause I posted it in the ReaScript subforum, I recently made another script which can help themers: Script: XR Theme color tweaker (ReaImGui demo) - Beta
X-Raym is offline   Reply With Quote
Old 04-25-2021, 11:43 AM   #2
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

Amazing!
vitalker is online now   Reply With Quote
Old 04-25-2021, 01:54 PM   #3
Lopez
Human being with feelings
 
Join Date: Aug 2011
Location: Germany
Posts: 241
Default

Thx! Helpful!
__________________
Lopez is offline   Reply With Quote
Old 08-28-2021, 10:28 AM   #4
gainstager
Human being with feelings
 
Join Date: Jul 2019
Posts: 55
Default

Hey Raym, I’m having trouble using this script. I kept getting ReaScript error, “attempt to concentrate a nil value (global folder)”.

I do not understand how to work from an uncompressed theme. I have always edited, re-zipped it, and imported the updated theme the old fashion way. Would you mind explaining how to set this script up in more detail?

Thank you!

UPDATE: lucas_LCS recently explained how to work from an uncompressed theme here (https://forum.cockos.com/showthread.php?t=235839).

Last edited by gainstager; 09-01-2021 at 02:20 PM.
gainstager is offline   Reply With Quote
Old 08-28-2021, 11:23 AM   #5
Rednroll
Human being with feelings
 
Join Date: Jan 2006
Posts: 1,992
Default

Awesome! Will have to try this out.

I just switch from the theme I'm editing to another, and then back. Which is tedious, but the benefit is that if I use a backup copy of the theme I'm editing is that I can A/B the changes I made to confirm if something got broken or not during my edits.
Rednroll is offline   Reply With Quote
Old 08-28-2021, 01:52 PM   #6
lucas_LCS
Human being with feelings
 
Join Date: Dec 2015
Posts: 2,100
Default

I keep the Theme Tweaker window open and click the "Reload images" button on the bottom.
You only need to reload the full theme if you want to clear unsaved changes made in the Theme Tweaker.

Quote:
Originally Posted by Rednroll
I just switch from the theme I'm editing to another, and then back. Which is tedious...
You can set up an Toolbar button to cycle between next and previous themes.

::
__________________
LCS Themes
lucas_LCS is offline   Reply With Quote
Old 08-31-2021, 01:31 PM   #7
permeke
Human being with feelings
 
Join Date: Dec 2019
Posts: 588
Default

undo possible ?
permeke is offline   Reply With Quote
Old 08-31-2021, 03:31 PM   #8
Vagalume
Human being with feelings
 
Join Date: Nov 2015
Posts: 604
Default

Ty X-Raym, really useful.
Vagalume is offline   Reply With Quote
Old 08-31-2021, 05:47 PM   #9
Win Conway
Human being with feelings
 
Join Date: Dec 2010
Posts: 3,826
Default

Macro
Next theme
Previous theme

That macro is on a button on my toolbar
__________________
Stop posting huge images, smaller images or thumbnail, it's not rocket science!
Win Conway is offline   Reply With Quote
Old 09-01-2021, 09:29 AM   #10
Vagalume
Human being with feelings
 
Join Date: Nov 2015
Posts: 604
Default

I used that macro, it worked but it is slowwwwwwww. This is muuuuch better than that macro ... just try it you won't have to change the focus from the Note Editor and Reaper thounsand of times a day ...
Vagalume is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.