- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am writing a small program to start an external program at a specified time. The user inputs the time they wish the external program to start. My code as of now basically gets the system time and compares that to the user input start time:
do while (remain_sec .GT. 0)
CALL SLEEPQQ(1000)
CALL GETTIM(tmphour, tmpminute, tmpsecond, tmphund)
now_sec = tmphour * 3600 + tmpminute * 60
remain_sec = start_sec - now_sec
hour_left = int(remain_sec / 3600)
min_left = ((remain_sec / 3600) - hour_left) * 60
end do
When I run the program, the dialog box is not responsive to anything. I would like to be able to minimize the dialog or press my stop button.
Does anyone have any suggestions? Any help would be greatly appreciated.
David
do while (remain_sec .GT. 0)
CALL SLEEPQQ(1000)
CALL GETTIM(tmphour, tmpminute, tmpsecond, tmphund)
now_sec = tmphour * 3600 + tmpminute * 60
remain_sec = start_sec - now_sec
hour_left = int(remain_sec / 3600)
min_left = ((remain_sec / 3600) - hour_left) * 60
end do
When I run the program, the dialog box is not responsive to anything. I would like to be able to minimize the dialog or press my stop button.
Does anyone have any suggestions? Any help would be greatly appreciated.
David
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are on the NT family you can just use SYSTEM to issue an appropriate AT or SCHTASKS (XP) command which will allow your program to continue.
James
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could try subroutine alarm in dfport.
Or you could create a thread to wait till the right time.
Or you could create a thread to wait till the right time.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page