Author Topic: If a file exist then execute button1  (Read 2841 times)

0 Members and 1 Guest are viewing this topic.

Offline IronMan

  • Newbie
  • Posts: 38
    • View Profile
If a file exist then execute button1
« 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?

Marked as best answer by IronMan on November 03, 2020, 12:21:54 pm

FellippeHeitor

  • Guest
Re: If a file exist then execute button1
« Reply #1 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.

Offline IronMan

  • Newbie
  • Posts: 38
    • View Profile
Re: If a file exist then execute button1
« Reply #2 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.

Offline IronMan

  • Newbie
  • Posts: 38
    • View Profile
Re: If a file exist then execute button1
« Reply #3 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.




FellippeHeitor

  • Guest
Re: If a file exist then execute button1
« Reply #4 on: November 03, 2020, 07:32:30 pm »
Share the whole package (frm + BAS) so I can look deeper.