 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2419 Location: Yateley, Hants, UK
|
Posted: Mon Sep 10, 2012 11:21 am Post subject: |
|
|
Rather than put Paul to the trouble of creating new FTN95 routines, when the Windows API routines are interfaced properly in the INS file, isn't this simply a matter of documenting them? (As they are Win32, they don't have INTEGER*2 anywhere).
Is it not the case that this could be done in most cases (and for the simplest and most commonly required functions) by text that is little more than a combination of John's question and Paul's answer? (MSDN contains descriptions that require knowledge of another language to decypher).
Could this be done in a "user supported" way (like Wikipedia)?
An important thing to note would be whether or not using the raw Win API routine might interfere with standard Clearwin+
There are hidden gems among the entries in the INS files. For example, there are routines to do a lot of things with scroll bars, like making them appear and disappear. One day I'm going to get around to exploring this in detail...
Eddie |
|
Back to top |
|
 |
johannes
Joined: 21 Jan 2011 Posts: 65 Location: Leimen, Germany
|
Posted: Tue Nov 13, 2012 7:57 pm Post subject: |
|
|
Hi all,
I'm also suffering currently from these DOS popups. Uusing the hints in this thread I try to avoid them as much as possible.
Under gcc.gnu.org I found plans about "CALL EXECUTE_COMMAND_LINE".
Would the specs of this command allow to popup a DOS flashes? Are there plans to implement it in ftn95 as 'silent' alternative to CALL SYSTEM ?
Johannes
Quote: |
Standard:
Fortran 2008 and later
Class:
Subroutine
Syntax:
CALL EXECUTE_COMMAND_LINE(COMMAND [, WAIT, EXITSTAT, CMDSTAT, CMDMSG ])
Arguments:
COMMAND Shall be a default CHARACTER scalar.
WAIT (Optional) Shall be a default LOGICAL scalar.
EXITSTAT (Optional) Shall be an INTEGER of the default kind.
CMDSTAT (Optional) Shall be an INTEGER of the default kind.
CMDMSG (Optional) Shall be an CHARACTER scalar of the default kind. |
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8261 Location: Salford, UK
|
Posted: Wed Nov 14, 2012 10:09 am Post subject: |
|
|
There is no reason to expect any interference between ClearWin+ and direct calls to the API except perhaps when processing messages provided by SendMessage and PostMessage.
There are currently no plans to implement EXECUTE_COMMAND_LINE. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2939 Location: South Pole, Antarctica
|
Posted: Wed Nov 21, 2012 7:50 am Post subject: |
|
|
How about SILENT_CISSUE@ or CISSUE_PRO@ when it runs without any info popups with 'shutup' key or with key 'popup_on_error' until error occurs? |
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8261 Location: Salford, UK
|
Posted: Wed Nov 21, 2012 9:44 am Post subject: |
|
|
If someone wants to post a short program illustrating a flashing DOS box then I will aim to find a way to avoid the flashing. |
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2939 Location: South Pole, Antarctica
|
Posted: Wed Nov 21, 2012 5:57 pm Post subject: |
|
|
Be prepared to use Task Manager or lose your work. I was tortured by popups 3-4 times for total probably 6-8 hours because stopping of started program was not allowed before found temporal workaround thanks for help of this board.
Code: |
! For Windows7.
! Compilation with the /win key obligatory:
! ftn95 AAA.FOR /link /free /win
!
! If you do not like to be infinitely tortured by popups - uncomment commented lines
! No responsibility implied.
! Use at your risk.
! For experienced users only with no mental problems
!
use clrwin
integer*2 ifail
iExit=0
luncw1 = 100
i=winio@('%ca[Damn Popups]&')
i=WINIO@('%fn[terminal]%ts%pv%40.10`cw[hscroll,vscroll,local_font]%ff&', 0.7d0, luncw1, ihwMainCW)
! i=WINIO@('%ac[esc]&','+','set',iExit,1, 'Exit')
! i=winio@('%cn%^bt[Close]&','+','set',iExit,1, 'Exit')
i=winio@('%lw', ilw )
do while (iExit.eq.0)
call sleep1@(0.15)
! call temporary_yield@()
call cissue@('dir >z',ifail)
write(100,*) 'It"s popups torture time'
enddo
end |
|
|
Back to top |
|
 |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8261 Location: Salford, UK
|
Posted: Wed Nov 21, 2012 9:46 pm Post subject: |
|
|
Code: |
winapp
integer,external::cb,winio@
i=winio@('%ca[Popups]&')
i=WINIO@('%fn[terminal]%ts%pv%40.10cw[hscroll,vscroll,local_font]%ff&', 0.7d0, 100)
i=winio@('%dl', 2.0d0, cb)
end
integer function cb()
integer i
stdcall WinExec 'WinExec'(STRING,VAL):integer
i= WinExec("cmd.exe /c dir >z",0)
write(100,*) "No flash...."
cb = 2
end |
|
|
Back to top |
|
 |
DanRRight
Joined: 10 Mar 2008 Posts: 2939 Location: South Pole, Antarctica
|
Posted: Thu Nov 22, 2012 11:38 am Post subject: |
|
|
hahaha...after such long thread no way anyone expected this kind of solution. Cool !
That was the POWER of RIGHT EXAMPLE!
Nice job, Paul! |
|
Back to top |
|
 |
|
|
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
|
Powered by phpBB © 2001, 2005 phpBB Group
|