Hi Idle,
Thanks you for the example, it is what I am looking for.
Thanks
Allen
Search found 97 matches
- Sat Feb 01, 2025 6:19 am
- Forum: Coding Questions
- Topic: Simulate button gadget is pressed
- Replies: 5
- Views: 1488
- Sat Feb 01, 2025 5:35 am
- Forum: Coding Questions
- Topic: Simulate button gadget is pressed
- Replies: 5
- Views: 1488
Simulate button gadget is pressed
Hi all,
I am looking for a method to simulate a button gadget is pressed. I searched the forum and found this command :
"PB_Gadget_SendGadgetCommand(GadgetID(#Gadget), #PB_EventType_LeftClick)"
However, it seems this command is no longer available, any suggestion?
Thanks
Allen
I am looking for a method to simulate a button gadget is pressed. I searched the forum and found this command :
"PB_Gadget_SendGadgetCommand(GadgetID(#Gadget), #PB_EventType_LeftClick)"
However, it seems this command is no longer available, any suggestion?
Thanks
Allen
- Sat Nov 30, 2024 1:54 pm
- Forum: Coding Questions
- Topic: window api question - DestroyWindow()
- Replies: 4
- Views: 756
Re: window api question - DestroyWindow()
Axolotl,
No worries. I did learned a lot from your advices (and from other members). Thank you again for your help all along.
Allen
No worries. I did learned a lot from your advices (and from other members). Thank you again for your help all along.
Allen
- Thu Nov 28, 2024 5:11 pm
- Forum: Coding Questions
- Topic: window api question - DestroyWindow()
- Replies: 4
- Views: 756
Re: window api question - DestroyWindow()
Axolotl,
It works, thanks the help.
I did test use the webgadget (PB built-in) to replace the use of chrome, however it seems the HTML code return from - GetGadgetItemText() with #PB_Web_HtmlCode flag did not encode chinese char properly . Web page display correctly, but content of HTML does not ...
It works, thanks the help.
I did test use the webgadget (PB built-in) to replace the use of chrome, however it seems the HTML code return from - GetGadgetItemText() with #PB_Web_HtmlCode flag did not encode chinese char properly . Web page display correctly, but content of HTML does not ...
- Thu Nov 28, 2024 2:25 pm
- Forum: Coding Questions
- Topic: window api question - DestroyWindow()
- Replies: 4
- Views: 756
window api question - DestroyWindow()
Hi,
I would like to use runprogram() to open a chrome window and then later close it (not minimize )
Below is my attempt using examples from other experienced member (thanks for their contribution).
The API Closewindow (line 44) work as expected but when I use DestroyWindow (line 43) it failed ...
I would like to use runprogram() to open a chrome window and then later close it (not minimize )
Below is my attempt using examples from other experienced member (thanks for their contribution).
The API Closewindow (line 44) work as expected but when I use DestroyWindow (line 43) it failed ...
- Wed Oct 09, 2024 3:13 pm
- Forum: Coding Questions
- Topic: Tree Gadget selection problem
- Replies: 2
- Views: 456
Re: Tree Gadget selection problem
Hi,
Kiffi, Thank you for the quick response and the information. I add checking for the EventType and it now work as expected.
Thanks
Allen
If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TreeGadget(0, 10, 10, 160, 160) ; TreeGadget standard ...
Kiffi, Thank you for the quick response and the information. I add checking for the EventType and it now work as expected.
Thanks
Allen
If OpenWindow(0, 0, 0, 355, 180, "TreeGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TreeGadget(0, 10, 10, 160, 160) ; TreeGadget standard ...
- Wed Oct 09, 2024 2:36 pm
- Forum: Coding Questions
- Topic: Tree Gadget selection problem
- Replies: 2
- Views: 456
Tree Gadget selection problem
Hi,
I am learning to use the tree gadget. I modified the example of the help file and want to get the item whenever its checkbox is checked. In below code the message appear twice whenever I tick a item's checkbox. Please advise.
Working in win 10 pro PB 6.11
Thanks
Allen
If OpenWindow(0, 0 ...
I am learning to use the tree gadget. I modified the example of the help file and want to get the item whenever its checkbox is checked. In below code the message appear twice whenever I tick a item's checkbox. Please advise.
Working in win 10 pro PB 6.11
Thanks
Allen
If OpenWindow(0, 0 ...
- Sat Sep 14, 2024 4:24 am
- Forum: Coding Questions
- Topic: Mouse status in desktop
- Replies: 5
- Views: 1106
Re: Mouse status in desktop
Hi RASHAD,
Thank you for the example. Definitely able to learn new technique from them.
Thanks
Allen
Thank you for the example. Definitely able to learn new technique from them.
Thanks
Allen
- Fri Sep 13, 2024 4:18 pm
- Forum: Coding Questions
- Topic: Mouse status in desktop
- Replies: 5
- Views: 1106
Re: Mouse status in desktop
Hi Axolotl,
Thank you for your example. It surely gives me a direction where to look for further information.
Hi RASHAD,
As most of my programming knowledge only comes from using Purebasic (learn from examples in help doc) and infromation from this forum. I do not understand your advise. I ...
Thank you for your example. It surely gives me a direction where to look for further information.
Hi RASHAD,
As most of my programming knowledge only comes from using Purebasic (learn from examples in help doc) and infromation from this forum. I do not understand your advise. I ...
- Fri Sep 13, 2024 8:52 am
- Forum: Coding Questions
- Topic: Mouse status in desktop
- Replies: 5
- Views: 1106
Mouse status in desktop
Hi,
DesktopMouseX() and DesktopMouseY() can return the coordinate of the mouse in dektop. How can I check if any of the mouse button is pressed. The mouse will not be inside any window gadget.
I only run in window. 10
Thanks.
Allen
DesktopMouseX() and DesktopMouseY() can return the coordinate of the mouse in dektop. How can I check if any of the mouse button is pressed. The mouse will not be inside any window gadget.
I only run in window. 10
Thanks.
Allen
- Wed May 01, 2024 2:26 am
- Forum: The PureBasic Editor
- Topic: Keep debug window open after program ends
- Replies: 11
- Views: 2910
Re: Keep debug window open after program ends
Hi Jassing,
May be you could try to use the standalone debugger.
Thanks
Allen
May be you could try to use the standalone debugger.
Thanks
Allen
- Fri Sep 15, 2023 8:39 am
- Forum: Coding Questions
- Topic: Handle and focus
- Replies: 10
- Views: 1334
Re: Handle and focus
Hi Jak64,
If you ( same as me) use google.com to load the web page instead of a webgadget, following code may be of interest to you. In chrome, you can monitor the reload icon at the top left corner to check if a web page is fuly loaded. When a page is loading, it show a "X", once completed, it ...
If you ( same as me) use google.com to load the web page instead of a webgadget, following code may be of interest to you. In chrome, you can monitor the reload icon at the top left corner to check if a web page is fuly loaded. When a page is loading, it show a "X", once completed, it ...
- Tue Sep 12, 2023 2:11 pm
- Forum: Coding Questions
- Topic: Webgadget and Google
- Replies: 3
- Views: 602
Re: Webgadget and Google
Hi,
You can use SetGadgetText() to set the URL. More info can be found in the WebGadget help file.
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "https://www.google.com")
SetGadgetText(0,"https://www.purebasic ...
You can use SetGadgetText() to set the URL. More info can be found in the WebGadget help file.
If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
WebGadget(0, 10, 10, 580, 280, "https://www.google.com")
SetGadgetText(0,"https://www.purebasic ...
- Mon Apr 10, 2023 1:17 am
- Forum: Coding Questions
- Topic: Simulate CTRL+A and CTRL+C
- Replies: 29
- Views: 3168
Re: Simulate CTRL+A and CTRL+C
@Jak64,
On the other hand, if I run the program 10 times, it opens 10 web pages. How to close them programmatically?
You can send another short cut key sequence to the chrome window to close it.
Procedure CloseChromeTap()
Protected.INPUT InputKey
; Control key Down
InputKey\Type = #INPUT ...
On the other hand, if I run the program 10 times, it opens 10 web pages. How to close them programmatically?
You can send another short cut key sequence to the chrome window to close it.
Procedure CloseChromeTap()
Protected.INPUT InputKey
; Control key Down
InputKey\Type = #INPUT ...
- Sun Apr 09, 2023 2:51 pm
- Forum: Coding Questions
- Topic: Simulate CTRL+A and CTRL+C
- Replies: 29
- Views: 3168
Re: Simulate CTRL+A and CTRL+C
@Jak64,
One reason I can think of is the delay time is not enough and the web page is not completly loaded. Please take a look at below video. You should be able to see the CTRL-A, CTRL-C effect on the chrome page.
https://streamable.com/5b8k7g
Please change the delay time at line 48 to delay ...
One reason I can think of is the delay time is not enough and the web page is not completly loaded. Please take a look at below video. You should be able to see the CTRL-A, CTRL-C effect on the chrome page.
https://streamable.com/5b8k7g
Please change the delay time at line 48 to delay ...