Jump to content
Sign in to follow this  
bundyxc

Two quick questions

Recommended Posts

bundyxc

I want to make a setup file, that will make a few exe files, and place them in an install directory, is this possible?

I'm also wondering if you can use have the program use itself as a task schedluer. When the program runs, I'd like to write the Last Run time to an INI file, and then after 30 minutes, have it run again. Is this possible?

It may be easier to do with unix time, with something like this:

$lastRun= IniRead ( "C:\Program Files\Program\config.ini", "General", "LastRun"", "0" )
$timeNow= getUnixTime()
$timeBetween = $lastRun - $timeNow

Since unix time is solely a number, you can easily do math functions to it, you know?

Any ideas? Thanks in advance.


Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^

Share this post


Link to post
Share on other sites
DaRam

Sure you could do that, but since the program is running anyway (to check the INI file), why would you just not use an internal timer to activate itself after 30 minutes? :)

I want to make a setup file, that will make a few exe files, and place them in an install directory, is this possible?

I'm also wondering if you can use have the program use itself as a task schedluer. When the program runs, I'd like to write the Last Run time to an INI file, and then after 30 minutes, have it run again. Is this possible?

It may be easier to do with unix time, with something like this:

$lastRun= IniRead ( "C:\Program Files\Program\config.ini", "General", "LastRun"", "0" )
$timeNow= getUnixTime()
$timeBetween = $lastRun - $timeNow

Since unix time is solely a number, you can easily do math functions to it, you know?

Any ideas? Thanks in advance.

Share this post


Link to post
Share on other sites
bundyxc

Sure you could do that, but since the program is running anyway (to check the INI file), why would you just not use an internal timer to activate itself after 30 minutes? :)

Because I need to make sure that the program is durable, and can survive reboots/logoffs/etc, and can keep that timer going. If it misses a run, then I need it to go as soon as it gets the chance. Also, how do you add it to the startup?


Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^

Share this post


Link to post
Share on other sites
Melba23

bundyxc,

Could I suggest using an .ini file to save the last run time? There are builtin IniWrite and IniRead functions to help you here.

As to adding it to the Startup folder, search the forums because there are many possibilities - - registry keys, manual addition, etc - depending on what level you want your app to run.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
bundyxc

I'd like to write the Last Run time to an INI file, and then after 30 minutes, have it run again.

I was already planning on using an INI, but thank you. :)

I'll research that, I'm sure I'll find something.

So.. I've found how to use Unix time.. now, does anybody know how to make an install file?


Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^

Share this post


Link to post
Share on other sites
Melba23

bundyxc,

Sorry - a "senior" moment (embarrassed shuffle of feet on carpet).

For the install file - have you looked at the FileInstall function? It lets you load files into your compiled .exe and then copy them to another machine when it is run. I have used it without problem - as long as the .exe has the right permissions, of course!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
bundyxc

I'm only sixteen, and I have those sort of moments too. Maybe just because I'm a dumb kid, or at least that's what my parents tell me. :)

Thanks for the help, I don't know why I didn't find that in the helpfile. :/


Global $arr[2]

$arr[0]="hip"
$arr[1]="hip"
;^^ hip hip array. ^^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×