Search found 103 matches

by Allen
Sun Jan 18, 2026 3:27 am
Forum: Coding Questions
Topic: Write a EPUB creator problems
Replies: 2
Views: 248

Re: Write a EPUB creator problems

Hi boddhi,

Thanks for the suggestion. I think you are right, current packer function cannot add new files to a existing zip. The only way is to unzip , and re-zip with additional files. Also it seems only one compression ratio is allowed that is specifyied when the zip is created.

If I want files ...
by Allen
Sat Jan 17, 2026 2:42 pm
Forum: Coding Questions
Topic: Write a EPUB creator problems
Replies: 2
Views: 248

Write a EPUB creator problems

Hi,

I want to use PureBasic to write a simple EPUB creator that I can convert some text files to a EPUB and read on my Ereader.

A EPUB is basically a zip file, however, the order of files are important. One particlar uncompressed file must be the first file in the ZIP, following by other ...
by Allen
Wed Sep 24, 2025 11:36 am
Forum: Coding Questions
Topic: SendInput problem with win gadget [SOLVED]
Replies: 4
Views: 474

Re: SendInput problem with win gadget (SOLVED)

Hi,

I found my mistake. Sendinput only send to the window in focus. To change the focus to desktop, I need to hide/minimize the count down window first. Add "HideWindow(0,#True): before CaptureScreen() the program will work.

Allen
by Allen
Wed Sep 24, 2025 9:32 am
Forum: Coding Questions
Topic: SendInput problem with win gadget [SOLVED]
Replies: 4
Views: 474

Re: SendInput problem with win gadget

Hi,

I would like to explain what I want to do, a popup window with STOP button and a count down timer, if no user inout, at the end of the count down, the screen will be capturedd and image saved .

UseJPEGImageDecoder()
UseJPEGImageEncoder()
EnableExplicit

Procedure CaptureScreen()
Protected ...
by Allen
Wed Sep 24, 2025 8:29 am
Forum: Coding Questions
Topic: SendInput problem with win gadget [SOLVED]
Replies: 4
Views: 474

Re: SendInput problem with win gadget

BarryG,

Yes, you are right, I can paste the image in PAINT after the program ended eventhough the ImageID return is zero. However, in the program, ImageID return zero (Image not initialized) means I cannot use other image command such as SaveImage(ImgeID,..) command to save the image inside the ...
by Allen
Wed Sep 24, 2025 6:07 am
Forum: Coding Questions
Topic: SendInput problem with win gadget [SOLVED]
Replies: 4
Views: 474

SendInput problem with win gadget [SOLVED]

Hi,

In below code, if I comment out line ";MessageRequester("Wait","Wait Capture screen to complete")" , the progam does not work, I cannot replace it with a delay() command such that no user inout is required. Any suggestion? Without the CreateWin(), the capture screen also works ...
by Allen
Sat Feb 01, 2025 6:19 am
Forum: Coding Questions
Topic: Simulate button gadget is pressed
Replies: 5
Views: 1706

Re: Simulate button gadget is pressed

Hi Idle,

Thanks you for the example, it is what I am looking for.

Thanks

Allen
by Allen
Sat Feb 01, 2025 5:35 am
Forum: Coding Questions
Topic: Simulate button gadget is pressed
Replies: 5
Views: 1706

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
by Allen
Sat Nov 30, 2024 1:54 pm
Forum: Coding Questions
Topic: window api question - DestroyWindow()
Replies: 4
Views: 928

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
by Allen
Thu Nov 28, 2024 5:11 pm
Forum: Coding Questions
Topic: window api question - DestroyWindow()
Replies: 4
Views: 928

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 ...
by Allen
Thu Nov 28, 2024 2:25 pm
Forum: Coding Questions
Topic: window api question - DestroyWindow()
Replies: 4
Views: 928

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 ...
by Allen
Wed Oct 09, 2024 3:13 pm
Forum: Coding Questions
Topic: Tree Gadget selection problem
Replies: 2
Views: 533

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 ...
by Allen
Wed Oct 09, 2024 2:36 pm
Forum: Coding Questions
Topic: Tree Gadget selection problem
Replies: 2
Views: 533

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 ...
by Allen
Sat Sep 14, 2024 4:24 am
Forum: Coding Questions
Topic: Mouse status in desktop
Replies: 5
Views: 1198

Re: Mouse status in desktop

Hi RASHAD,

Thank you for the example. Definitely able to learn new technique from them.

Thanks

Allen
by Allen
Fri Sep 13, 2024 4:18 pm
Forum: Coding Questions
Topic: Mouse status in desktop
Replies: 5
Views: 1198

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 ...