Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - IronMan

Pages: [1] 2 3
1
QB64 Discussion / Re: If a file exist then execute button1
« 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.




2
QB64 Discussion / Re: If a file exist then execute button1
« 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.

3
QB64 Discussion / 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?

4
This will search the FRUIT.TXT and replace the word APPLE with PEAR, and re-write to output file.

5
OK guys I got it and wanted to post in the event anyone else ever needs it.

This works perfect!


CALL Replace

PRINT "Complete"

SUB Replace ()
    text$ = ""

    OPEN "FRUIT.txt" FOR INPUT AS #1
    DO WHILE NOT EOF(1)
        LINE INPUT #1, line$
        text$ = text$ + line$ + CHR$(13) + CHR$(10)
    LOOP
    CLOSE #1

    text$ = StrReplace$(text$, "APPLE", "PEAR")
    text$ = LEFT$(text$, LEN(text$) - 1)

    OPEN "FRUIT_2.txt" FOR OUTPUT AS #2
    PRINT #2, text$
    CLOSE #2
END SUB

'$INCLUDE:'source\utilities\strings.bas'

6
I'm needing a small piece of code that will search and replace a word in a text file. Must search the entire file, and replace all entries found. I did have this saved but lost it and can't remember how to do it. Any help appreciated.  Thank you.

7
Programs / Re: Get Weather with Online API!
« on: July 21, 2020, 06:41:29 pm »
SpriggsySpriggs,


Job well done! It works great... :-))

your method of removing the extra $$ and .. is a lot more simple than the way I done it. I'm going to have to make a note of this for sure..

weather = STRING.Remove(weather, CHR$(10) + ".")
weather = STRING.Remove(weather, "$$")



My way:


OPEN "fetch1.txt" FOR INPUT AS #1
OPEN "fetch2.txt" FOR OUTPUT AS #2
WHILE NOT EOF(1)
    INPUT #1, LineTxt
    IF LEFT$(LineTxt, 1) = "." THEN
PRINT #2, " "PRINT #2, MID$(LineTxt, 2); " "
ELSE
PRINT #2, LineTxt 'write output to new file fetch2.txt
END IF
WEND
CLOSE #1
CLOSE #2

' Remove $$
OPEN "fetch3.txt" FOR INPUT AS #1
OPEN "forecast.txt" FOR OUTPUT AS #2
WHILE NOT EOF(1)
    INPUT #1, LineTxt2
    IF LineTxt2 = "$$" THEN
LineTxt2 = "  "
PRINT #2, "  "
ELSE
PRINT #2, LineTxt2 'write output to new file forecast.txt
END IF
WEND
CLOSE #1
CLOSE #2


Guess I just like taking the long way around, Hehehehe


Congratulations again on a great job.


8
Programs / Re: Get Weather with Online API!
« on: July 21, 2020, 02:13:38 pm »
Don't know if this will help you, but here is a list of zones I compiled for all the locations.

9
QB64 Discussion / Re: Black Window Pop-up when starting application
« on: June 01, 2020, 02:26:45 pm »
WORKING!!!!  Thanks for all the help. I as using _SCREENHIDE instead of $SCREENHIDE.

Everything working great..

Thank you.
Kent

10
QB64 Discussion / Re: Black Window Pop-up when starting application
« on: June 01, 2020, 08:35:42 am »
Why do you keep asking same question again?
https://www.qb64.org/forum/index.php?topic=2406.msg116251#msg116251

Perhaps because I have failed yet to get it to work like I need it to. Am I missing something? Is this forum not the place where we share and ask for help? Perhaps I'm confused.....

11
QB64 Discussion / Black Window Pop-up when starting application
« on: May 31, 2020, 11:51:35 pm »
I am trying to call another Windows application by using the SHELL command from within a QB64 application. It all works just fine with the exception of it displaying a BLACK WINDOW when application starts just before running the SHELL command.

Is there a way to not show or hide the default screen when a QB64 app first runs. It only display for a second, but because this small application is running another windows application using the SHELL command, it flashes the black window on the screen first.


Basically the code is:

_SCREENHIDE
SHELL _HIDE "PROGRAM.EXE"
END


Everything works perfect for what I'm needing to do except the black pop-up windows when the program starts.



Any help is appreciated.

Thank you.
Kent

12
$SCREENHIDE
IF COMMAND$ = "-h" THEN 'the screen is hidden by default
ELSE
_SCREENSHOW 'and we unhide it if the "-h" flag is absent
END IF

Yea, that's what I'm doing and it works good. However, is there a way to not show the Window? I need a way to make it run completely hidden.

Thanks.
-Kent

13
I may have spoken to soon.

Although when I use the code at the beginning of my app,

IF COMMAND$ = "-h" THEN
_SCREENHIDE
ELSE
END IF


It does stop the program from running in the foreground. However the first time you run it, it still shows the WINDOW.
After it's runs for the first time, it no longer show the window. Anyone have any ideas on this?

Thank you.
-Kent


14
Got it working... That was far more easier than I was thinking..

IF COMMAND$ = "-h" THEN
_SCREENHIDE
ELSE
END IF


I have tested with and without the -h command option and it works perfect.

Thanks.
-Kent

15
Pete

Thanks for the info.

So how would you pass a command line option to the program to enable $SCREENHIDE?

Looking to do something like  "application.exe -h" to make it run in hidden mode, otherwise it would run normal if no command line option is used.

Thanks.
-Kent

Pages: [1] 2 3