flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > converter for ResEd resource syntax to fasm resource syntax

Author
Thread Post new topic Reply to topic
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 07 Sep 2006, 12:40
more info here,
http://www.boinc.ch/~sleepsleep/viewtopic.php?t=97

using vbscript Evil or Very Mad Evil or Very Mad Evil or Very Mad to output the ResEd resource syntax to fasm resource syntax Laughing Laughing Laughing

the dialog support should be completed and i would add menu support soon Smile
anyway, please try it and report bug(s) or idea or something that you think i should know.

source is there with example Smile

sincerely,
sleepsleep Wink
Post 07 Sep 2006, 12:40
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 07 Sep 2006, 13:41
nice idea Smile
unfortunately i had no success in converting this resource script:
Code:
;This Resource Script was generated by WinAsm Studio.

#define D_MAIN 1000
#define B_CAN 2
#define B_OK 1
#define EDIT_1 1001
#define EDIT_2 1002

D_MAIN DIALOGEX 0,0,178,48
CAPTION "FBASE"
FONT 8,"MS Sans Serif"
STYLE 0x10c80800
EXSTYLE 0x00000000
BEGIN
        CONTROL "",EDIT_1,"Edit",0x50010080,7,8,108,13,0x00000200
        CONTROL "",EDIT_2,"Edit",0x50010080,7,28,108,13,0x00000200
        CONTROL "Cancel",B_CAN,"Button",0x50010000,122,27,49,15,0x00000000
        CONTROL "OK",B_OK,"Button",0x50010001,122,7,49,15,0x00000000
END    

also:
- usage of redirecting makes hard usage of this script from IDE, needs removing host echo lines each time after converting
- can not find parameter if run from other folder (like cscript d:\fasm\rcc.vbs dialog.rc > dialog.inc)
- there is no need to define section - it is not hard to do in source, also, there could be single ".flat" section.
anyway nice - it can be ported into real utility after finishing Wink
Post 07 Sep 2006, 13:41
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 07 Sep 2006, 14:17
hi mr. shoorick Smile Smile
about ur resource script,
first, since this utilities is made and targetted against ResEd (ketil0) and not the winasm studio, so there is a glinch there.

it should be easy to fix.
coz there is a CRLF in your
Code:
#define EDIT_2 1002
<< clear the blank here coz ResEd doesn't output blank here >>
D_MAIN DIA....
    

once u clear that line. u would have
Code:
section '.rsrc' resource data readable
;-------------------------------------
D_MAIN          = 1000
B_CAN           = 2
B_OK            = 1
EDIT_1          = 1001
EDIT_2          = 1002

directory \
        RT_DIALOG, dialogs

resource dialogs,\
        D_MAIN, LANG_ENGLISH+SUBLANG_DEFAULT, D_MAINres


dialog  D_MAINres, "FBASE", 0,0,178,48, 0x10c80800, 0x00000000, , "MS Sans Serif", 8
        dialogitem  "Edit", "", EDIT_1, 7,8,108,13, 0x50010080,0x00000200
        dialogitem  "Edit", "", EDIT_2, 7,28,108,13, 0x50010080,0x00000200
        dialogitem  "Button", "Cancel", B_CAN, 122,27,49,15, 0x50010000,0x00000000
        dialogitem  "Button", "OK", B_OK, 122,7,49,15, 0x50010001,0x00000000
enddialog
    


regarding
usage of redirecting makes hard usage of this script from IDE, needs removing host echo lines each time after converting
anyway, maybe we can come up with another .bat or etc or .vbs or a small console program to remove the first 2 line generated by Windows Scripting Host :p

can not find parameter if run from other folder (like cscript d:\fasm\rcc.vbs dialog.rc > dialog.inc)
yah, i just notice that too Sad Sad Sad
Post 07 Sep 2006, 14:17
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 07 Sep 2006, 14:27
targetted against ResEd >
hope it is not a great difference do make utility more universal Wink

redirecting has another bad effect - when i run it from ide then output intercepted, and i get all text in the ide out window (even with these ">" etc. Very Happy)
(i use winasm studio with fasm add-in, as you understand)

regards!

_________________
UNICODE forever!
Post 07 Sep 2006, 14:27
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 07 Sep 2006, 14:45
to make it skip blanks (which is my fault actually)
change the
do while fr.AtEndOfLine <> True
to
do while fr.AtEndOfStream <> True

*sorry, my silly mistake!! Razz

anyway, i would try to grab acopy of winasm studio and see if i could make everybody life easy Smile ~ no promise, but i would try and see Smile


Last edited by vbVeryBeginner on 07 Sep 2006, 14:51; edited 1 time in total
Post 07 Sep 2006, 14:45
View user's profile Send private message Visit poster's website Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1614
Location: Ukraine
shoorick 07 Sep 2006, 14:50
there is no good documentation yet for add-in (lack of time) - ask directly if you have any trouble with it.
Post 07 Sep 2006, 14:50
View user's profile Send private message Visit poster's website Reply with quote
farrier



Joined: 26 Aug 2004
Posts: 274
Location: North Central Mississippi
farrier 10 Sep 2006, 18:21
vbVeryBeginner,

Thanks for this tool. I've tried it on 7 of my RadASM .rc files and your converter works perfectly. The only restricition is with menus. Keep up the great work!

farrier

_________________
Some Assembly Required
It's a good day to code!
U.S.Constitution; Bill of Rights; Amendment 1:
... the right of the people peaceably to assemble, ...
The code is dark, and full of errors!
Post 10 Sep 2006, 18:21
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 12 Sep 2006, 02:20
thanks for the feedback, farrier,
i am currently trying to add the menu support into the script, hopefully i could have it done sooon Smile
Post 12 Sep 2006, 02:20
View user's profile Send private message Visit poster's website Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY 03 Oct 2006, 15:23
Looks really nice!
Keep up the good work!
Post 03 Oct 2006, 15:23
View user's profile Send private message Reply with quote
kohlrak



Joined: 21 Jul 2006
Posts: 1421
Location: Uncle Sam's Pad
kohlrak 23 Apr 2007, 01:01
Lookin' good. It's hit that time where i need a RSRC editor since i don't know a darn thing when it comes to resrouces. Now i don't know if some of those things in that example aren't working because there's nothing in them yet (not sure if you're supposed to do that in res or in the source code since i know so little at this point) like the ListBox. Either way you look at it, i'm looking forward to the end of this project. It looks very good. =)
Post 23 Apr 2007, 01:01
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.