Search found 12 matches

by artnat
Fri Dec 06, 2024 4:52 pm
Forum: Coding Questions
Topic: recycle bin
Replies: 2
Views: 465

recycle bin

Is there a possibility to delete files/directories into the recycle bin in windows?
by artnat
Thu Dec 05, 2024 9:04 pm
Forum: Coding Questions
Topic: Randomseed, does it work?
Replies: 6
Views: 958

Re: Randomseed, does it work?

Ooooh, I was blind!
by artnat
Thu Dec 05, 2024 8:43 pm
Forum: Coding Questions
Topic: Randomseed, does it work?
Replies: 6
Views: 958

Randomseed, does it work?

I wanted a random sequence, which is always the same. Here a four lines example:

Code: Select all

randomseed = 0
For i.l = 1 To 10
  Debug Random(100000)
Next
I expected alsways the same sequence of ten random numbers, but they are different each time. What am I doing wrong? Or what is the benefit of randomseed?
by artnat
Thu Dec 05, 2024 4:34 pm
Forum: Coding Questions
Topic: Colors for buttons and combo boxes
Replies: 1
Views: 423

Colors for buttons and combo boxes

Does any possibility exist, to give buttons and comboboxes background and foreground colors, like the stringgadgets in the same application?
by artnat
Sun Dec 01, 2024 6:06 pm
Forum: Coding Questions
Topic: Programrunning doesn't work with batch programs
Replies: 4
Views: 775

Re: Programrunning doesn't work with batch programs

I found a way, to start the program itself with the batchfile as parameter. The program (freefilesync) runs fine, and the handle is 1, but I still get the error message "The specified "program" is not valid."

handle.i=RunProgram("FreeFileSync.exe", "C:\Users\hd\OneDrive\Documents\prog\purebasic ...
by artnat
Sun Dec 01, 2024 4:30 pm
Forum: Coding Questions
Topic: Programrunning doesn't work with batch programs
Replies: 4
Views: 775

Programrunning doesn't work with batch programs

If I start a batch file with RunProgram, a valid 1 is returned, but to find the end condition by ProgramRunning does not work. The error message is "The specified program is not valid". That is not very astonishing, since the batchfile starts another program, and what I want to find out is, when ...
by artnat
Mon Nov 25, 2024 12:47 pm
Forum: Coding Questions
Topic: I am unable to get any information about a started program
Replies: 2
Views: 621

Re: I am unable to get any information about a started program

Many t hanks to Bisonte: I didn't think of a 64 bit handle. Now it works.
by artnat
Sun Nov 24, 2024 8:35 pm
Forum: Coding Questions
Topic: I am unable to get any information about a started program
Replies: 2
Views: 621

I am unable to get any information about a started program

I found myself unable to get information about a program started with RunProgram.
Too make things simple I wrote the following code lines:

p.l = RunProgram("C:\Users\hd\Desktop\DesktopOK_x64.exe", "", "", #PB_Program_Open)
Debug p
If IsProgram(p)
Debug "ok"
Else
Debug "not valid"
EndIf

The ...
by artnat
Thu Nov 21, 2024 10:08 am
Forum: Coding Questions
Topic: .eml-parser
Replies: 2
Views: 520

.eml-parser

Does anybody know an eml-parser to apply in purebasic, and how to embody it into the code?
by artnat
Mon Nov 11, 2024 8:35 pm
Forum: Coding Questions
Topic: .eml-files
Replies: 1
Views: 412

.eml-files

I have thousands of .eml-files in my e-mail archive. I want to parse single eml-files and I would like to apply some of the purebasic mail functions:

CreateMail
FreeMail
GetMailAttribute
GetMailBody
IsMail

I don't know how to address the eml-files with those functions. Is there a possibility?
by artnat
Mon Nov 11, 2024 7:19 pm
Forum: Coding Questions
Topic: Parent Window
Replies: 1
Views: 409

Parent Window

On opening a window the parent window is to be specified.
What is the parent window specification, if the parent is just the screen?
by artnat
Sun Nov 10, 2024 3:48 pm
Forum: Coding Questions
Topic: directory not initialized
Replies: 3
Views: 603

directory not initialized

I show a code snippet, that does not work:

"C:\Users\Hans Delfs\OneDrive\Pictures\temporäre bilder\leer\snippet..jpg"

stvz is a global string with a valid directory name, as shown by debug. #stvz is -1.

The program crashes in line 212 with the message: The specified #Directory is not ...