This is how i'm using monitoring app inside thread. I have tested with other methods which uses lot of cpu in small Delay(), this one checks for app every second and it closes itself when the monitoring app is closed. Edit: added timeout to reduce CPU usage "WaitWindowEvent(10)".
Global Opera.s ...
Search found 366 matches
- Thu Nov 13, 2025 5:04 pm
- Forum: Coding Questions
- Topic: How to detect when a window created by another process is closed in PureBasic?
- Replies: 3
- Views: 714
- Fri May 24, 2024 11:29 pm
- Forum: Coding Questions
- Topic: Why is the directory not created ?
- Replies: 13
- Views: 2295
Re: Why is the directory not created ?
; Bisonte: http://www.purebasic.fr/english/viewtopic.php?p=496867#p496867
Prototype proto_msdpe(Path.p-Ascii)
Procedure _MSDPE(Path.s)
ProcedureReturn MakeSureDirectoryPathExists_(Path)
EndProcedure
Global MakeSureDirectoryPathExists.proto_msdpe = @_MSDPE()
Debug MakeSureDirectoryPathExists ...
Prototype proto_msdpe(Path.p-Ascii)
Procedure _MSDPE(Path.s)
ProcedureReturn MakeSureDirectoryPathExists_(Path)
EndProcedure
Global MakeSureDirectoryPathExists.proto_msdpe = @_MSDPE()
Debug MakeSureDirectoryPathExists ...
- Tue Mar 31, 2020 9:09 pm
- Forum: Coding Questions
- Topic: Find which StringGadget has it’s text selected
- Replies: 2
- Views: 1106
Re: Find which StringGadget has it’s text selected
With the Little John's help.
; Little John: http://www.purebasic.fr/english/viewtopic.php?p=375082#p375082
Define start.i, stop.i
OpenWindow(0, 0, 0, 322, 205, "StringGadget", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
StringGadget(1, 8, 10, 306, 20, "Bla Blib Blub")
StringGadget(2, 8 ...
; Little John: http://www.purebasic.fr/english/viewtopic.php?p=375082#p375082
Define start.i, stop.i
OpenWindow(0, 0, 0, 322, 205, "StringGadget", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
StringGadget(1, 8, 10, 306, 20, "Bla Blib Blub")
StringGadget(2, 8 ...
- Mon Jan 21, 2019 8:14 pm
- Forum: Coding Questions
- Topic: Get pressed modifier key(s) + mouse click + mouse movement?
- Replies: 11
- Views: 3001
Re: Get pressed modifier key(s) + mouse click + mouse moveme
Try theese MouseHook's ; RASHAD: https://www.purebasic.fr/english/viewtopic.php?p=523064#p523064
Global oTime
Procedure MouseHook(nCode, wParam, lParam)
Select wParam
Case #WM_LBUTTONDOWN
If GetTickCount_() < (oTime + GetDoubleClickTime_())
SetGadgetText(0, "Left Mouse DblClicked ...
Global oTime
Procedure MouseHook(nCode, wParam, lParam)
Select wParam
Case #WM_LBUTTONDOWN
If GetTickCount_() < (oTime + GetDoubleClickTime_())
SetGadgetText(0, "Left Mouse DblClicked ...
- Tue Jun 05, 2018 10:55 pm
- Forum: Coding Questions
- Topic: Mouse Hook to capture Left Double Click
- Replies: 5
- Views: 2131
Re: Mouse Hook to capture Left Double Click
That did the trick, thanks RASHAD.
- Tue Jun 05, 2018 10:36 pm
- Forum: Coding Questions
- Topic: Mouse Hook to capture Left Double Click
- Replies: 5
- Views: 2131
Re: Mouse Hook to capture Left Double Click
As MSDN says: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644986(v=vs.85).aspx
The identifier of the mouse message. This parameter can be one of the following messages: WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE, WM_MOUSEWHEEL, WM_MOUSEHWHEEL, WM_RBUTTONDOWN, or WM_RBUTTONUP.
I have ...
The identifier of the mouse message. This parameter can be one of the following messages: WM_LBUTTONDOWN, WM_LBUTTONUP, WM_MOUSEMOVE, WM_MOUSEWHEEL, WM_MOUSEHWHEEL, WM_RBUTTONDOWN, or WM_RBUTTONUP.
I have ...
- Tue Jun 05, 2018 9:30 pm
- Forum: Coding Questions
- Topic: Mouse Hook to capture Left Double Click
- Replies: 5
- Views: 2131
Mouse Hook to capture Left Double Click
Hi, i'm using this method to capture mouse clicks inside DVBViewer window, i'd like to change the position of Viewer window with Left Mouse Double Click, but can't find any solution. ; Fluid Byte: http://www.purebasic.fr/english/viewtopic.php?p=236663#p236663
Procedure MouseHook(nCode, wParam ...
Procedure MouseHook(nCode, wParam ...
- Sat May 12, 2018 3:10 pm
- Forum: Coding Questions
- Topic: Fonts in the EditorGadget
- Replies: 6
- Views: 2206
Re: Fonts in the EditorGadget
You can try with these, thanks to: Srod & netmaestro.
; Srod: http://www.purebasic.fr/english/viewtopic.php?p=164184#164184
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 270, 160, "TextGadget", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
TextGadget(0, 10, 10, 250, 20, "TextGadget Standard ...
; Srod: http://www.purebasic.fr/english/viewtopic.php?p=164184#164184
If OpenWindow(0, #PB_Ignore, #PB_Ignore, 270, 160, "TextGadget", #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)
TextGadget(0, 10, 10, 250, 20, "TextGadget Standard ...
- Tue Feb 27, 2018 8:30 pm
- Forum: Coding Questions
- Topic: How to get version of .exe file ?
- Replies: 2
- Views: 1551
Re: How to get version of .exe file ?
I'm using this one from sverson, which works on Win 10 pro x64: http://www.purebasic.fr/english/viewtop ... 812#p79812
- Mon Feb 05, 2018 8:43 pm
- Forum: Coding Questions
- Topic: How to include specific Font i my software ...
- Replies: 7
- Views: 7729
Re: How to include specific Font i my software ...
Jou can include it in DataSection then load it, thanks to netmaestro & Num3:
http://www.purebasic.fr/english/viewtop ... 30#p234030
http://www.purebasic.fr/english/viewtop ... 30#p234030
- Tue Feb 28, 2017 10:59 pm
- Forum: Tricks 'n' Tips
- Topic: ExamineRegistry procedures
- Replies: 2
- Views: 2630
Re: ExamineRegistry procedures
Thanks boyoss, some errors are present.
Debug output: SystemRoot = C:\Windows
BuildBranch = rs1_release
BuildGUID = ffffffff-ffff-ffff-ffff-ffffffffffff
BuildLab = 14393.rs1_release.161220-1747
BuildLabEx = 14393.693.amd64fre.rs1_release.161220-1747
CompositionEditionID = Professional
CurrentBuild ...
Debug output: SystemRoot = C:\Windows
BuildBranch = rs1_release
BuildGUID = ffffffff-ffff-ffff-ffff-ffffffffffff
BuildLab = 14393.rs1_release.161220-1747
BuildLabEx = 14393.693.amd64fre.rs1_release.161220-1747
CompositionEditionID = Professional
CurrentBuild ...
- Tue Jan 17, 2017 9:01 pm
- Forum: Coding Questions
- Topic: Rename files from system32 in Windows 10
- Replies: 7
- Views: 5835
Re: Rename files from system32 in Windows 10
I'm using it via batch scripts only. You can use it in PB inside DataSection, extract it to Temp and run a command: Procedure ExtractIncludeFile(Name.s, *StartFile, *EndFile)
If CreateFile(0, Name)
WriteData(0, *StartFile, *EndFile - *StartFile)
CloseFile(0)
ProcedureReturn #True
EndIf ...
If CreateFile(0, Name)
WriteData(0, *StartFile, *EndFile - *StartFile)
CloseFile(0)
ProcedureReturn #True
EndIf ...
- Mon Jan 16, 2017 7:57 pm
- Forum: Coding Questions
- Topic: Rename files from system32 in Windows 10
- Replies: 7
- Views: 5835
Re: Rename files from system32 in Windows 10
Hi!, for Win 10 permissions the only working tool for me is SetACL.
- Sun Nov 13, 2016 8:30 pm
- Forum: Coding Questions
- Topic: MakeSureDirectoryPathExists fail [SOLVED]
- Replies: 8
- Views: 3336
Re: MakeSureDirectoryPathExists fail [SOLVED]
Thanks to all. Solved now. 
- Sat Nov 12, 2016 8:27 pm
- Forum: Coding Questions
- Topic: MakeSureDirectoryPathExists fail [SOLVED]
- Replies: 8
- Views: 3336
Re: MakeSureDirectoryPathExists fail [SOLVED]
Thanks, now i'm using Shardik's solution http://www.purebasic.fr/english/viewtop ... 11#p495011
Code: Select all
Debug SHCreateDirectory_(0, "C:\Temp\Kcc")