Welcome, Guest. Please login or register.


Author Topic: Questions about QUIGS programming. (Read 1553 times)

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 73.0 Firefox 73.0
    • View Profile
Questions about QUIGS programming.
« on: 2020.March.05. 21:15:10 »
Tutus, can you put here your .qpf program? Maybe I can fix it.

 

Offline Tutus

  • EP user
  • *
  • Posts: 486
  • Country: hu
  • OS:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 73.0 Firefox 73.0
    • View Profile
    • Enterpress News
Re: Questions about QUIGS programming.
« Reply #1 on: 2020.March.06. 11:27:29 »
Thank you for this topic, Gustavo :)

I did the following:
- I rewrote the header
- I loaded a small image into the sheet with a .bmp extension
- I opened an image box on the form and referred to the image in the sheet
- I signed a text under the picture
After Compile, the .exe launched in SymbOS: the cursor is bounced, nothing else is displayed.



Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 73.0 Firefox 73.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #2 on: 2020.March.06. 18:44:53 »
It has not been easy....

Code: [Select]
// Quigs 1.01 Application for Symbos
// Name:
// Coder:
// Date / Version:

// Declare variables
Var Enter:Sheet   // a curious type of variable to store  graphics

// End declares

Function Main:Void()
// Main loop

EndF

Function Image1.Event:Void()

//Lets load the Sheet according to No. of colours
If Screen.Colour = 2 Then
//Its a 2 colour image so xxx.qs1
Enter.Load(App.Path+"Sheet1.qs1")   // these two sets of graphics are created automatically
Else
//Its a 4 colour image so xxx.qs2
Enter.Load(App.Path+"Sheet1.qs2")   // and have to go with the application.
EndIf

Ctrl.Image.Tile.Set Image1, Enter,0   // this command loads the file on the Image1 control
Ctrl.Refresh Image1       // this command rewrites the event.


EndF

Function Form1.Close.Event:Void()
Enter.Free   //releases memory at exit
EndF
Function Form1.Open.Event:Void()
Image1.Event       // this is necessary to launch the Image1 event just at opening the program.


Also, if you want to show a text, the space has to be bigger than the No. of characters:

« Last Edit: 2020.March.06. 18:52:38 by gflorez »

Offline Tutus

  • EP user
  • *
  • Posts: 486
  • Country: hu
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 73.0 Firefox 73.0
    • View Profile
    • Enterpress News
Re: Questions about QUIGS programming.
« Reply #3 on: 2020.March.10. 20:50:51 »
Thank You! :)



It's really not easy. I'll study the code :D

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows NT 6.3 Windows NT 6.3
  • Browser:
  • Firefox 75.0 Firefox 75.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #4 on: 2020.April.13. 01:41:13 »
I have the threads about SymbOS a little abandoned, sorry.

Tutus, today I have made some changes to your program. First I have modified the type of control for the line "Magazine...", instead of a control line only a label, the "A" symbol is used to select it. This avoids the text to be modified with the keyboard.

But then I have thought about a nice touch to the label, some action. I have added a button, and declared a matrix of short strings with the same text but on other languages....

The good side is that you can define all the matrix values on the same definition.

But... the Quigs text editor has a great limitation with very long lines, so I have needed to cut and paste the strings on single lines, with the added difficulty of it not allowing you to cut and paste with the mouse buttons.... only with the menu.

Then, I have learned that you can't assign values to variables on the definition area(for example a=0), so the best place I have found is inside the  Form1.Open.Event function. It only happens once, Just at the start of the app.

Also, I have declared a counter that is increased every time the button is clicked. When it reaches 10 it is reset to 0. Then the new text is displayed.

The result is effective, with so few changes.
« Last Edit: 2020.April.13. 01:47:46 by gflorez »

Offline szipucsu

  • EP addict
  • *
  • Posts: 8477
  • Country: hu
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 80.0.3987.163 Chrome 80.0.3987.163
    • View Profile
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: Questions about QUIGS programming.
« Reply #5 on: 2020.April.13. 11:03:38 »
The result is effective, with so few changes.
It was cool, so many languages! Some more sentences in some languages would be interesting.
100 SOUND SOURCE 3,STYLE 16,LEFT 16,RIGHT 64,SYNC 2
110 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 2
120 SOUND PITCH 25,SYNC 2
Videos

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 74.0 Firefox 74.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #6 on: 2020.April.13. 12:11:24 »
I have put a matrix of 10, some are still empty, but you can put the limit you want.

The code for doing it is very "Basic":

Code: [Select]
// Declare variables
Var Enter:Sheet
Var LangText(10):String   //   0 to 9  Here you can set the limit
Var Lang:Int=0
// End declares
//
Function Main:Void()
// Main loop

EndF

Function Form1.Open.Event:Void()
Image1.Event
LangText(0)="Magazine for Enterprise users"
LangText(1)="Magazin Enterprise felhasznalok szamara"
LangText(2)="Revista para usuarios de Enterprise"
LangText(3)="Magazyn dla uzytkownikow Enterprise"
LangText(4)="Benutzermagazin Enterprise"
LangText(5)="Magazine utilisateur Entreprise"
LangText(6)="Language 7"
LangText(7)="Language 8"
LangText(8)="Language 9"
LangText(9)="Language 10"
        // Add more lines if you want
// No accent marks are allowed
EndF

And then on the button event:

Code: [Select]
Function Button1.Event:Void()
Lang=Lang+1
If Lang>9 Then      // Here change your limit
Lang=0
EndIf
Label1.Text.Set(LangText(Lang))
Label1.Refresh

EndF
« Last Edit: 2020.April.13. 12:30:49 by gflorez »

Offline Tutus

  • EP user
  • *
  • Posts: 486
  • Country: hu
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 75.0 Firefox 75.0
    • View Profile
    • Enterpress News
Re: Questions about QUIGS programming.
« Reply #7 on: 2020.April.13. 19:55:02 »
I have the threads about SymbOS a little abandoned, sorry.
Tutus, today I have made some changes to your program. First I have modified the type of control for the line "Magazine...", instead of a control line only a label, the "A" symbol is used to select it. This avoids the text to be modified with the keyboard.
No problem! I can't run QUIGS at home. I have a PC at work, yes (but I'm working from home for the third week now).
I don't know, maybe you don't have a MacOSX version?
Thank you so much for dealing with it! Especially that with my Enterpress program! :)
That's why I'm learning the codes. And what you sent can be run on an original Enterprise machine. :)
Otherwise, it would be huge to have an Internet connection under SymbOS on an Enterprise machine once. Then I would start with a separate Enterpress newspaper that can be used here in simple HTML format. :D
« Last Edit: 2020.April.13. 19:59:10 by Tutus »

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Linux Linux
  • Browser:
  • Firefox 68.0 Firefox 68.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #8 on: 2020.April.14. 00:54:54 »
Sorry, there is only the Windows version. I have not tried Quigs on Linux, on Wine, if it works maybe it can work on the Apple.

Yes, of course it works on the real Enterprise, I always test the programs several times until they work as I want, both on the emulator and on the machine.  I even try them on the other SymbOS computers I own, MSX and  PCW.

It would be a dream to have a connexion, yes, but you already can read it as a file on SymbOS.

A pity that development is so slow. I have good intentions but my skills don't let me do all what I want,. On the other side, our genious have their own lives, their own problems. And then the world is convulsed with the virus to make things worse....

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 75.0 Firefox 75.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #9 on: 2020.April.14. 08:50:27 »
I have tried the Quigs program on Linux and it starts and seems to work well, but it managed to erase all the Quigs directory when I tried to load some projects.... I don't know it is is sure to run it outside real Win OS.

Offline Tutus

  • EP user
  • *
  • Posts: 486
  • Country: hu
  • OS:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 75.0 Firefox 75.0
    • View Profile
    • Enterpress News
Re: Questions about QUIGS programming.
« Reply #10 on: 2020.April.16. 07:02:10 »
It would be a dream to have a connexion, yes, but you already can read it as a file on SymbOS.
But I think the SF3 card will have an internet connection under SymbOS. Or is it still under testing?

Online gflorez

  • EP addict
  • *
  • Posts: 2833
  • Country: es
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 75.0 Firefox 75.0
    • View Profile
Re: Questions about QUIGS programming.
« Reply #11 on: 2020.April.16. 12:05:08 »
Yes, there is the hardware, but Prodatron has to write drivers for it. He is actually missing....

Hans wrote a Webradio program(you already have the source of an old version on the Quigs dirctory) that access the hardware directly, but still the SF3 has not been integrated on SymbOS.

Edit: On the other side.... maybe this situation impulse us to not wait and make ourselves the drivers.
« Last Edit: 2020.April.16. 12:12:54 by gflorez »