Open a file at line X with FlowStudio
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Hello,

    i see in the Guide it's possible with AREXX but i don't know the AREXX command line.

    Somebody could help me please?

    [EDIT]

    If i write this command:

    RX FLOWSTUDIO.1 OPEN sys:MorphOS.readme LINE 10

    It say: Arexx server is not active... but CRABUM need AREXX work...

    i dont' understand...
  • »25.09.24 - 12:25
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Is there a solution to test if the port FLOWSTUDIO.1 is available?

    I see waitforport command in mossys:c/ but i would like a result 0 or 1 for example :-)

    I see Portlist too but maybe there is another solution?
  • »27.09.24 - 17:09
    Profile Visit Website
  • ghh
  • Cocoon
    Cocoon
    ghh
    Posts: 60 from 2017/7/16
    From: Prague
    Little Arexx
    Code:
    /* Show(P) Return Ports */
    ports = Show(P)
    If Index(ports,'FLOWSTUDIO.1') >0 Then Say "1"
    Else Say "0"
  • »27.09.24 - 21:38
    Profile Visit Website
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2096 from 2003/2/24
    From: po-RNO
    Are you doing something in Hollywood?

    If you are, then you can do these things without using any external commands/programs:

    Code:
    Function p_CheckProgram(exe$, port$)
    Local result = False
    If RunRexxScript("RETURN SHOW('P','" .. port$ .. "')", True) = "0"
    ; Launch the program if its port wasn't found.
    Run(exe$)
    ; Own WaitForPort implementation, you could also do Execute("WaitForPort", port$) instead.
    For Local i = 1 To 10
    If RunRexxScript("RETURN SHOW('P','" .. port$ .. "')", True) = "1"
    result = True
    Break
    EndIf
    Wait(50)
    Next
    Else
    ; Port was found.
    result = True
    EndIf
    Return(result)
    EndFunction

    If p_CheckProgram("SYS:Applications/FlowStudio/FlowStudio", "FLOWSTUDIO.1")
    RunRexxScript("ADDRESS FLOWSTUDIO.1;'OPEN FILE sys:MorphOS.readme LINE 10'", True)
    Else
    DebugPrint("Couldn't launch the program.")
    EndIf
  • »28.09.24 - 14:10
    Profile Visit Website
  • MorphOS Developer
    Nadir
    Posts: 162 from 2003/3/17
    Unless you want to do something more complicated, there might be no need to go through the ARexx port at all. An easier alternative is to just call the program directly with the needed arguments. Unless you use the NEWAPP argument, the call will go to an existing FlowStudio session.

    By the way, FlowStudio already seems to have most of the functionality that you want to implement built into the app but itself. Still, maybe there are people who want a different/simpler app for this so don't let that dissuade you :-)
  • »30.09.24 - 12:55
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Thanks Nadir for your return ;-)

    I have create Easy2Makefile because i would like to port more games for MorphOS and this GUI will help me because often there is no Makefile to compile them. The GUI will create them easiest. Your feature to open a file at a specific line is very usefull when i compile and there are errors at line xx in the file yyyyy :-D

    Maybe one day i will create a new project from 0 with FlowStudio when i learn to developp in C/C++ :-D
  • »01.10.24 - 15:46
    Profile Visit Website
  • MorphOS Developer
    Nadir
    Posts: 162 from 2003/3/17
    Did you ever try creating makefiles from FlowStudio? In a simple case, you just need to add the needed files to your project through the GUI and press the hammer.

    FlowStudio maintains an xprj file with all information related to the project and then creates a makefile every time you want to build. You probably want to do something similar in your tool. In fact, there is also a small commandline tool that can create a makefile from an xprj. I don't remember if we include it in the SDK but if not, we could I guess.


    /Nicholai
  • »01.10.24 - 16:36
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2227 from 2003/4/10
    From: France
    Quote:

    Nadir a écrit :
    Did you ever try creating makefiles from FlowStudio?


    No, i must try. But like i am not a developper in C/C++ i don't know all the features of FlowStudio to use it like an IDE to create and compile projects. For the moment i use it like a source file editor.

    Tcheko had realized a small tutoriel about that in the forum, i must search it and test it.

    Maybe it will be fine to add it (Tcheko tutorial) in the Guide of FlowStudio for the newbies.
  • »01.10.24 - 17:08
    Profile Visit Website