Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
join strings
#1
is there any way to make that easier:

Code:
Copy      Help
[color=blue]str [/color]gui = "C:\Programme\gui4cli\pi\dbl_explorer.gui"
[color=blue]str [/color]s
[color=blue]run [/color]g4c s.format("%s ''%s''" GuiLoad gui)

GuiLoad belongs to my gui4cli init
Code:
Copy      Help
[color=blue]def [/color]g4c "gui4cli.exe"
[color=blue]def [/color]GuiLoad "-command GuiLoad -fs"

i would like to write it in one line
Code:
Copy      Help
[color=blue]run [/color]g4c ("%s ''%s''" GuiLoad gui)
pi
#2
honk !!!

make a function with formating and you have your 1liner Confusedhock:

Code:
Copy      Help
g4c(GuiLoad gui)

function g4c
Code:
Copy      Help
[color=blue]function [/color]$com $arg1

[color=blue]str [/color]s
[color=blue]run [/color]gui4cli s.format("%s ''%s''" com arg1)

Smile
pi


Forum Jump:


Users browsing this thread: 1 Guest(s)