Search found 33 matches

by PresFox
Wed Sep 22, 2010 8:12 am
Forum: Coding Questions
Topic: Killing programs / processes with purebasic?
Replies: 2
Views: 1643

Killing programs / processes with purebasic?

Hello everyone,

I have a fairly show PC, and before i start a heavy game i have to kill all background programs (like MSN, Internet Explorer, Windows Explorer, etc)

Currently i am doing that manually every time via the task manager, but i wonder, is it with purebasic possible to kill those ...
by PresFox
Sat Apr 03, 2010 9:28 pm
Forum: Coding Questions
Topic: [DONE] read integer from file?
Replies: 9
Views: 1587

Re: read integer from file?

that worked

thanks artic fox
by PresFox
Sat Apr 03, 2010 8:53 pm
Forum: Coding Questions
Topic: [DONE] read integer from file?
Replies: 9
Views: 1587

Re: read integer from file?

after some more expirementing, i found more is wrong, the numbers dont match at all

this is my code:

OpenFile(2,"settings.ini");
oldid = Val(ReadString(2))
newid = oldid +1
Debug newid
newid$ = Bin(newid)
Debug newid$
TruncateFile(2)
WriteString(2,newid$)

it should read the old id from ...
by PresFox
Sat Apr 03, 2010 8:50 pm
Forum: Coding Questions
Topic: [DONE] read integer from file?
Replies: 9
Views: 1587

Re: read integer from file?

that works, thanks!

now, i want to write the new id to the file, erasing the old one.

how can i erase the old one? (currently it writes the new id behindd it, so its 0123456 etc

Thanks in advance
by PresFox
Sat Apr 03, 2010 8:22 pm
Forum: Coding Questions
Topic: [DONE] read integer from file?
Replies: 9
Views: 1587

[DONE] read integer from file?

Hello,

I have a txt file, and in the first line it holds the last used ID for an item in a list view.

Now, when adding a new item, i want to read that old id, add 1, and use the new id for the list item, then update the old id in the txt file (so the next item gets a new id, etc.)

However, i cant ...
by PresFox
Sat Apr 03, 2010 6:40 pm
Forum: Coding Questions
Topic: [DONE] Some way to split a string into an array?
Replies: 7
Views: 6414

Re: Explode? Some way to split a string into an array?

Demenivec, thanks, works wonders! :)
by PresFox
Sat Apr 03, 2010 6:27 pm
Forum: Coding Questions
Topic: [DONE] Adding items from a file to a ListIconGadget,
Replies: 3
Views: 975

Re: Adding items from a file to a ListIconGadget, endless lo

This was my mistake, i put a call to the procedure in the main loop, so it was called over and over again

works fine now
by PresFox
Sat Apr 03, 2010 6:18 pm
Forum: Coding Questions
Topic: [DONE] Adding items from a file to a ListIconGadget,
Replies: 3
Views: 975

Re: Adding items from a file to a ListIconGadget, endless lo

debug also shows a endless row of the same (single) line in the file
by PresFox
Sat Apr 03, 2010 5:47 pm
Forum: Coding Questions
Topic: [DONE] Adding items from a file to a ListIconGadget,
Replies: 3
Views: 975

[DONE] Adding items from a file to a ListIconGadget,

Hello,

I am trying to populate a listicongadget from a file.

This is the code i am using:

Procedure populate_list()

If ReadFile(0, "Landers.dat") ; if the file could be read, we continue...
While Eof(0) = 0 ; loop as long the 'end of file' isn't reached
landers$ = ReadString(0)
; explode ...
by PresFox
Sat Apr 03, 2010 5:39 pm
Forum: Coding Questions
Topic: [DONE] Some way to split a string into an array?
Replies: 7
Views: 6414

[DONE] Some way to split a string into an array?

Hello,

Next question (im making seperate threads to increase searchability for others, please let me know if this is frowned upon)

I have a string wich consists of several values, split by a delimiter, eg: ABC*DEFG*JKL

I want to split this in 3 different values, ABC, DEFG, and JKL.

In PHP ( wich ...
by PresFox
Sat Apr 03, 2010 5:27 pm
Forum: Coding Questions
Topic: [DONE] Depreciated function - CreateGadgetList()?
Replies: 2
Views: 848

Re: Depreciated function - CreateGadgetList()?

thanks alot, does the trick
by PresFox
Sat Apr 03, 2010 5:16 pm
Forum: Coding Questions
Topic: [DONE] Depreciated function - CreateGadgetList()?
Replies: 2
Views: 848

[DONE] Depreciated function - CreateGadgetList()?

My Visual editor uses this function, but the compiler says its depreciated?

What should i use instead?
by PresFox
Sat Apr 03, 2010 5:13 pm
Forum: Coding Questions
Topic: [DONE] Writing to a file from a stringgadet
Replies: 6
Views: 1115

Re: Writing to a file from a stringgadet

Thanks, indeed i was!

Works :)
by PresFox
Sat Apr 03, 2010 4:10 pm
Forum: Coding Questions
Topic: [DONE] Writing to a file from a stringgadet
Replies: 6
Views: 1115

[DONE] Writing to a file from a stringgadet

Hello,

I have a stringgadget in my window, and i want to take the input from it and write it to a file.

I am not sure how to go about this.

I have tried this:

Procedure Open_Window_1()
If OpenWindow(#Window_1, 308, 114, 391, 76, "New window ( 1 )", #PB_Window_SystemMenu | #PB_Window ...
by PresFox
Sat Apr 03, 2010 4:03 pm
Forum: Coding Questions
Topic: [DONE] #PB_event_gadget - Constant not found?
Replies: 5
Views: 1184

Re: #PB_event_gadget - Constant not found?

thanks for the help guys, works now