QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: IronMan on November 03, 2020, 03:46:11 pm

Title: If a file exist then execute button1
Post by: IronMan on November 03, 2020, 03:46:11 pm
I am needing a way for a QB64 / InForm App to look and see if a file exist every 5 minutes. The app will remain running on the Task Bar, and if the file is detected, I need the app to automaticly execute Button1. Does any one know how this can be accomplished, or have a snippet to share?
Title: Re: If a file exist then execute button1
Post by: FellippeHeitor on November 03, 2020, 03:47:37 pm
Code: QB64: [Select]
  1. if _fileexists("yourfile") then
  2. __UI_Click Button1

do that in sub beforeupdatedisplay.
Title: Re: If a file exist then execute button1
Post by: IronMan on November 03, 2020, 05:22:36 pm
Code: QB64: [Select]
  1. if _fileexists("yourfile") then
  2. __UI_Click Button1

do that in sub beforeupdatedisplay.

Works perfect.

Thank you.
Title: Re: If a file exist then execute button1
Post by: IronMan on November 03, 2020, 06:12:32 pm
Works perfect. but my progress bar does not function when I do this. If I click the button1 manually everything works, and everything works with the

1.IF _FILEEXISTS("yourfile") THEN
2.__UI_Click Button1
3.END IF


perfectly but does not show my progress bar like it does when you manually click button1. But it does everything else that button1 does when clicked.



Title: Re: If a file exist then execute button1
Post by: FellippeHeitor on November 03, 2020, 07:32:30 pm
Share the whole package (frm + BAS) so I can look deeper.