|
Post by Roger Cabo on Aug 10, 2023 21:11:05 GMT 1
Hi everyone, I saved my source files always like ProjectXYZ___ 66a.g32The last or 3 or 4 digits after the _ identify my personal version number. In this case 66a. Is there a way to grab this version number and pass it into the "Produktversion" number or "DateiVersion" number at the dialogue " GFABasic32 Exe erzeugen" > Version ?
Or is there another way?!. So after compile.. I'd like to read out an information inside of an exe file and let display eg. "66a = was the compiled source code into Exe"
I do not want to press any button/menus and to add any number manually in the editor, because sometimes I forget... and then I ask me.. WTF what code version I used for the compiled exe?! Any ideas how so solve this automatically when simply running the Code by F5? Eg: Open the source file, Read the filename Extract version number Pass it into the gb32 code anyhow After compile I got the info inside of the running exe. There is one restriction.. Don't save the info into any file, try to ship the file with the package, and read from that file..
|
|
|
Post by scalion on Aug 11, 2023 13:18:37 GMT 1
Hi Roger, I think you need to use a personalised compile menu. The gfa_compile instruction in a gll extension can help you. Just insert automatically lines how you want using g32 source name with the gfa_insert statement before launch compilation.
|
|
|
Post by Roger Cabo on Aug 11, 2023 18:52:15 GMT 1
Hi Roger, I think you need to use a personalised compile menu. The gfa_compile instruction in a gll extension can help you. Just insert automatically lines how you want using g32 source name with the gfa_insert statement before launch compilation. Thank you very much!
Another question:
It's possible to remove a file from the inline resource ... after I used Gfa_CopyFile Source$, Dest$? Didn't find any GFA_InlFileDelete(":" or index) or similar. A workaround would be: Open the source file as binary an read through all the entries at the end and try to find the correct name starting with ":code1" followed by a value. :code1 32 TVnYg8VDKACIgkGIooSYsAiYqkCIsACKhBiKgIWKNoA= :test_exe 4171, 46592 UsAUDtWMMsAAAewC1vgBAAhETGmMhEkFxgPBzjw/WqRIxQUZD+zLhETQD1SEjYSEx8YKvi/i40vH ...
|
|
|
Post by scalion on Aug 12, 2023 12:16:55 GMT 1
Your workaround is the best. There's no other way apparently.
|
|
|
Post by (X) on Aug 12, 2023 17:13:31 GMT 1
From Help on Gfa_InlFileName...
Gfa_CopyFile Command and Gfa_InlFileName Function Gfa_CopyFile "", ":icodeb" Full exerpt:
|
|
|
Post by Roger Cabo on Aug 12, 2023 19:59:19 GMT 1
Yes! Thank you... I totally over read this.
To delete an entry in the ":Files" tab specify the empty string for src$ and its resource name is dest$. Gfa_CopyFile "", ":icodeb"
Would it possible to create a menu (Compile menu) in gll in the same way like the other ocx menus with ocxocx commands?
|
|
|
Post by (X) on Aug 13, 2023 2:05:38 GMT 1
Would it possible to create a menu (Compile menu) in gll in the same way like the other ocx menus with ocxocx commands?
Well, you can create your own menu items that will appear in the Editor's "Extra" menu. And, we can prompt the user for input...
But, can we create a "dialog box with edit fields and checkboxes etc"? Hmmm... I am not sure. I will look into this.
|
|
|
Post by (X) on Aug 13, 2023 3:36:20 GMT 1
Well, it's a start... This procedure, when put into a GLL and called, opens a form as one would expect from the Form command. It is unclear how we might respond to inputs as there seems to be a inability to respond to events from inside a GLL. This is quite new to me and I am not yet sure what the limitations are.
I am getting my information from the help document under: Dialog Command.
Proc P_Dialog_Test '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Create a Dialog 'form'... ' Notes: ' 1) The Dialog command is useful for converting GFA-BASIC 16 programs and in ' GLL extensions. ' 2) In a normal program use Form instead. ' 3) OCX types are not allowed in a GLL. ' Local dlgf&, s%, v% Const STYLE1 = WS_TABSTOP Const STYLE2 = BS_DEFPUSHBUTTON | WS_TABSTOP Const STYLE3 = BS_GROUPBOX | WS_TABSTOP Const STYLE4 = BS_AUTORADIOBUTTON | WS_TABSTOP Const STYLE5 = BS_AUTOCHECKBOX | WS_TABSTOP Const STYLE6 = ES_UPPERCASE | WS_BORDER | WS_TABSTOP Const STYLE7 = LBS_NOTIFY | LBS_SORT | LBS_STANDARD | WS_BORDER | WS_VSCROLL Const STYLE8 = CBS_DROPDOWN | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL Const WS_OVERLAPPEDWINDOW = 0xCF0000 DlgBase Pixel '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' DIALOG SYNTAX: ' Dialog hd%,x%,y%,w%,h%,tit$ [,flag% [,height%,font$] ] ' Dialog # 1, 10, 10, 400, 400, "Dlg Test", WS_OVERLAPPEDWINDOW EditText "Test", 100, 10, 10, 100, 30, STYLE6 EndDialog ShowDialog # 1 ~SetFocus(DlgItem(1, 100)) EndProc
|
|
|
Post by (X) on Aug 13, 2023 16:55:55 GMT 1
|
|
|
Post by Roger Cabo on Aug 14, 2023 18:00:25 GMT 1
Thank you..
I tried several things but I do not get the IsWindow(hwnd) back from the
Dim Hwnd% = DlgItem(1, 100) ~SetFocus(Hwnd%) MsgBox IsWindow(Hwnd%)
Also:
Do Sleep() Loop Until MouseK = 1
As long as you can't build a loop, you can not react to anything, unfortunately..
|
|
|
Post by Roger Cabo on Aug 14, 2023 18:03:24 GMT 1
Type POINTAPI x As Long y As Long End Type
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long Declare Function ScreenToClient Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Function HoleMausPositionFuerFenster(ByVal hwnd As Long) As POINTAPI Dim pt As POINTAPI GetCursorPos pt ScreenToClient hwnd, pt HoleMausPositionFuerFenster = pt End Function
Perhaps it possible to get the control by hWnd and be able to access it anyhow. All DoEvents, Peek.. etc cause a Fatal Error.
|
|