Author Topic: Convertion tool  (Read 2891 times)

0 Members and 1 Guest are viewing this topic.

Shish

  • Guest
Convertion tool
« on: August 02, 2002, 07:17:17 AM »
Can someone write tool that
converts Sci decoder files
(like script.000) into interpriter
files (like 0.scr).
Or maybe Brian release it???



Offline OmerMor

Re:Convertion tool
« Reply #1 on: August 02, 2002, 07:44:32 AM »
I think you only need to rename them...

Shish

  • Guest
Re:Convertion tool
« Reply #2 on: August 02, 2002, 09:06:22 AM »
Yeah!!!
The smallest sci1 game -
Leisure Suit Larry has 547 files!!!
Rename them al!?!?!?!
I was mistaken...
I meant no conversion tool,
but renaming tool!

Pikachu14

  • Guest
Re:Convertion tool
« Reply #3 on: August 02, 2002, 09:53:11 AM »
Qbasic. Figure it out yourself.

Shish

  • Guest
Re:Convertion tool
« Reply #4 on: August 02, 2002, 12:49:20 PM »
I haven't programmed in QBasic so long
so i forgot everything i'm wrighting:
shell "ren script.00"+ str$(i) +" "+ str$(i)+".scr"

But it's not working!
I think it's because + command make space
between strings...
Maybe someone can help???

Pikachu14

  • Guest
Re:Convertion tool
« Reply #5 on: August 02, 2002, 02:31:18 PM »
for i=0 to 517

'These lines add trailing zeros. This is the stupid, but easy way.
if len(str(i))=1 then thenum="00"+str(i)
if len(str(i))=2 then thenum="0"+str(i)
if len(str(i))=3 then thenum=""+str(i)

shell "ren script."+thenum+" "+thenum+".scr"

next i

Shish

  • Guest
Re:Convertion tool
« Reply #6 on: August 03, 2002, 01:17:08 AM »
It's not working, man!
It's because
"blablabla" + str$(1) is not
"blablabla1", but
"blblabla            1"
i don't know why it's happens!!!
I tried it in all versions QB i have - 1.0, 4.0, 4.5
Maybe someone else can figure it out???

Offline OmerMor

Re:Convertion tool
« Reply #7 on: August 03, 2002, 08:10:20 AM »
I don't know QBasic, but I know that in VB you need to use the '&' operator to append strings.
Maybe it'll work for you in Qbasic.

Offline Mokalus of Borg

Re:Convertion tool
« Reply #8 on: August 05, 2002, 12:10:42 AM »
str$(1) will return " 1", for reasons best known to itself. If you want to convert a number to a string, without spaces, you need to use ltrim$(str$(x)).

Mokalus of Borg

PS - I knew all those years programming in QBasic would come in handy some day.
PPS - Of course, I was never a hardcore QB hax0r like some freaks out there, but I made do.

Offline df

Re:Convertion tool
« Reply #9 on: August 05, 2002, 07:38:04 AM »
something like

Code: [Select]

dim i as integer

for i=0 to 999
   shell "ren script." & i & " " & right$("00" & i, 3) & ".scr"
next




SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.024 seconds with 16 queries.