Skip to content

Commit

Permalink
Update Rename_Helper.osl
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Dec 5, 2024
1 parent 1f46d25 commit ed6705c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions OSL Programs/apps/System/Rename_Helper.osl
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,29 @@ window "show"
file "open" passed_data "onlyaccess"
// handle big files

file "get" 2
name = data
file "get" 1
type = data

input_main = name ++ type
input_main = fileGet(2) ++ fileGet(1)
input_main.destr

folder = fileGet(1) === ".folder"
if folder (
input_main = fileGet(2).destr
)

mainloop:
load_theme

loc 999 2 0 -63
square 250 30 10 : c#prim
input 250 23 "main"
input 250 23 "main" "Rename file" txtc

loc 999 2 0 -113
square 250 30 10 : c#prim
if clicked or "enter".onpress (
dta = input_main.split(".")
if dta.len == 1 and folder (
file "set" 2 dta[1].destr
window "stop"
)
file "set" 2 dta[1].destr
file "set" 1 "." ++ dta[2].destr
window "stop"
Expand Down

0 comments on commit ed6705c

Please sign in to comment.