Search found 46 matches

by whizza
Fri Mar 20, 2020 3:35 pm
Forum: Mac OSX
Topic: Time traveling balls.
Replies: 3
Views: 1379

Re: Time traveling balls.

A short delay after flipobuffers() helps. Procedure Nap(MS) StartTime.q = ElapsedMilliseconds() While ElapsedMilliseconds() - StartTime < MS WaitWindowEvent(1) Wend EndProcedure If InitSprite() = 0 Or InitKeyboard() = 0 MessageRequester("Error", "Sprite system can't be initialized&quo...
by whizza
Fri Mar 20, 2020 12:44 pm
Forum: Mac OSX
Topic: Time traveling balls.
Replies: 3
Views: 1379

Time traveling balls.

Why does this program behave differently on OSX and Windows when spacebar is pressed? On Windows the balls resume on the expected path. On OSX the balls appear to leap forward in time. Is there a way to make balls behave the same way on both OS? Using PureBasic 5.72 Beta 2 for MacOS X (64-bit) on Ca...
by whizza
Wed Mar 11, 2020 12:12 pm
Forum: Coding Questions
Topic: File Creation Date, Last Modified Date, Last Accessed Date
Replies: 11
Views: 1998

Re: File Creation Date, Last Modified Date, Last Accessed Da

Josh, I can assure you I'm not. True I do not have much experience of programming for Windows os but I'm not a hacker.

I'm just looking for a method to ensure that the exe only runs once per day but I do not want to use any additional files or the registry to keep track of this.
by whizza
Tue Mar 10, 2020 8:24 pm
Forum: Coding Questions
Topic: File Creation Date, Last Modified Date, Last Accessed Date
Replies: 11
Views: 1998

Re: File Creation Date, Last Modified Date, Last Accessed Da

Thanks Marc56us but I'm storing the result of SetFileDate() in LMDate2 and the result is zero.

I did produce exe from your version of code, but SetFileDate() still did not change the date stamp on exe file.
by whizza
Tue Mar 10, 2020 4:39 pm
Forum: Coding Questions
Topic: File Creation Date, Last Modified Date, Last Accessed Date
Replies: 11
Views: 1998

Re: File Creation Date, Last Modified Date, Last Accessed Da

Set the #PB_Date_Modified of the running exe file to when exe was launched. Not very elegant, but it works. Is there a better solution? Global LaunchExE$ = ProgramFilename() Global ExEBytes.q = FileSize(LaunchExE$) Global LMDate = GetFileDate(LaunchExE$, #PB_Date_Modified) MessageRequester("LMD...
by whizza
Tue Mar 10, 2020 12:19 pm
Forum: Coding Questions
Topic: File Creation Date, Last Modified Date, Last Accessed Date
Replies: 11
Views: 1998

Re: File Creation Date, Last Modified Date, Last Accessed Da

I'm trying to set the #PB_Date_Modified of the running exe to when exe was launched but it doesn't appear to be working. Is this due to Windows permissions or because the exe file is open for it to be executed ? Global LaunchToD = Date() Global LaunchExE$ = ProgramFilename() Global LMDate1 = GetFile...
by whizza
Tue Mar 10, 2020 10:09 am
Forum: Coding Questions
Topic: File Creation Date, Last Modified Date, Last Accessed Date
Replies: 11
Views: 1998

File Creation Date, Last Modified Date, Last Accessed Date

Hi,

Using PB, is there a way to examine and change a files Creation Date, Last Modified Date, Last Accessed Date?
by whizza
Tue Mar 03, 2020 10:54 am
Forum: Coding Questions
Topic: Why does this program stop responding after CtrlAltDel ?
Replies: 9
Views: 1299

Re: Why does this program stop responding after CtrlAltDel ?

Does this fix need PB 5.72 b1? Yes.
by whizza
Sun Mar 01, 2020 5:51 pm
Forum: Coding Questions
Topic: Why does this program stop responding after CtrlAltDel ?
Replies: 9
Views: 1299

Why does this program stop responding after CtrlAltDel ?

Hi Why does this program stop responding when CtrlAltDel used to start Task Manager? Is there a way to make the program continue to run after CtrlAltDel? Using Windows10 Home v1909 and PB5.71x64 If InitSprite() = 0 Or InitKeyboard() = 0 MessageRequester("Error", "Sprite system can't b...
by whizza
Mon Feb 24, 2020 4:40 pm
Forum: General Discussion
Topic: Microsoft Application Verifier 10.0 (x64)
Replies: 2
Views: 2031

Microsoft Application Verifier 10.0 (x64)

Hi

Is it possible to obtain verification of a PBx64 exe using Microsoft Application Verifier 10.0 (x64) with no errors?

https://docs.microsoft.com/en-us/window ... cation-kit
by whizza
Thu Feb 20, 2020 5:00 pm
Forum: Coding Questions
Topic: [ERROR] There is no current GadgetList.
Replies: 9
Views: 1167

Re: [ERROR] There is no current GadgetList.

Thanks everyone for the 'event loop' advice.

Thanks for the embellished example code TI-994A. Is there a reason you do not use 'UseGadgetList(WindowID)' as mentioned by Mijikai?
by whizza
Thu Feb 20, 2020 2:42 pm
Forum: Coding Questions
Topic: [ERROR] There is no current GadgetList.
Replies: 9
Views: 1167

Re: [ERROR] There is no current GadgetList.

So why does it work if coded as follows? DTops=ExamineDesktops() Global DWx=DesktopWidth(0)/2 Global DHy=DesktopHeight(0)/2 If OpenWindow(0, 0, 0, DWx, DHy, "", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered) = 0 MessageRequester("Error", "Can't open window", 0) ...
by whizza
Thu Feb 20, 2020 1:52 pm
Forum: Coding Questions
Topic: [ERROR] There is no current GadgetList.
Replies: 9
Views: 1167

[ERROR] There is no current GadgetList.

Hi I'm just looking for an explanation as to why '[ERROR] There is no current GadgetList' occurs when Help button is clicked prior to a number button being clicked. DTops=ExamineDesktops() Global DWx=DesktopWidth(0)/2 Global DHy=DesktopHeight(0)/2 If OpenWindow(0, 0, 0, DWx, DHy, "", #PB_W...
by whizza
Mon Feb 03, 2020 5:50 pm
Forum: The PureBasic Editor
Topic: Delete Line
Replies: 3
Views: 2634

Delete Line

Hi

Is there a key combination to delete the current line?

If not could one be added? Eg. Ctrl Y.

Also, if the Del key is pressed on a line that contains only whitespace (spaces & tabs), why not just delete the entire line with a single press of the Del key?