Search found 6364 matches

by infratec
Sat Apr 13, 2024 9:42 pm
Forum: Coding Questions
Topic: Get data from opened website
Replies: 7
Views: 331

Re: Get data from opened website

Or with a regular expression: .*<hello>(.*)<\/.* If CreateRegularExpression(0, ".*<hello>(.*)<\/.*") If ExamineRegularExpression(0, "sjdfhjsf<hello>123</hello>") While NextRegularExpressionMatch(0) Debug RegularExpressionGroup(0, 1) Wend EndIf Else Debug RegularExpressionError() ...
by infratec
Sat Apr 13, 2024 9:34 pm
Forum: Coding Questions
Topic: Get data from opened website
Replies: 7
Views: 331

Re: Get data from opened website

Code: Select all

HTML$ = "sjdfhjsf<hello>123</hello>"
Pos1 = FindString(HTML$, "<hello>")
If Pos1
  Pos1 + 7
  Pos2 = FindString(HTML$, "<" , Pos1)
  If Pos2
    Value$ = Mid(HTML$, Pos1, Pos2 - Pos1)
    Debug Value$
  EndIf
EndIf
by infratec
Sat Apr 13, 2024 12:55 pm
Forum: Bugs - Documentation
Topic: Better example for CatchImage()
Replies: 0
Views: 60

Better example for CatchImage()

To make it directly runable: If OpenWindow(0, 0, 0, 148, 148, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If CatchImage(0, ?Geebee) ImageGadget(0, 10, 10, 0, 0, ImageID(0)) EndIf Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf DataSection GeeBee: Includ...
by infratec
Sat Apr 13, 2024 12:51 pm
Forum: Bugs - Documentation
Topic: Make it easier for users: example in ImageGadget()
Replies: 0
Views: 44

Make it easier for users: example in ImageGadget()

The example in the help for ImgageGadget ist not runable out of the box. That's not nice. This would be better: If OpenWindow(0, 0, 0, 286, 148, "ImageGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) If LoadImage(0, #PB_Compiler_Home + "Examples\Sources\Data\Geebee2.bmp&quo...
by infratec
Sat Apr 13, 2024 12:16 pm
Forum: Coding Questions
Topic: Deletefile() not working?
Replies: 4
Views: 166

Re: Deletefile() not working?

And you need to check the result of

Code: Select all

NextDatabaseRow(#db2)
like

Code: Select all

If NextDatabaseRow(#db2)
Because if your select returns no entry, you get into trouble.
by infratec
Sat Apr 13, 2024 9:18 am
Forum: Bugs - Documentation
Topic: Partly bad example for ListIconGadget()
Replies: 0
Views: 54

Partly bad example for ListIconGadget()

In the help for the ListIconGadget is a large example to show the different possbilities. Unfortunately the example is not 100% Ok. ; Here we change the ListIcon display to large icons and show an image If LoadImage(0, #PB_Compiler_Home+"examples/sources/Data/File.bmp") ; change path/filen...
by infratec
Fri Apr 12, 2024 10:42 pm
Forum: Coding Questions
Topic: Get data from opened website
Replies: 7
Views: 331

Re: Get data from opened website

Something like that should work: OpenWindow(0, 0, 0, 800, 600, "PureBasic", #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered) WebGadget(0, 0, 0, 800, 600, "https://www.purebasic.com/french/#loginform") Repeat Event = WaitWindowEvent() Select Event Case #PB_Event_Gadget Select ...
by infratec
Fri Apr 12, 2024 10:32 pm
Forum: Coding Questions
Topic: Setting and Getting GadgetITemData on a ListIconGadget
Replies: 4
Views: 199

Re: Setting and Getting GadgetITemData on a ListIconGadget

What HeXOR mean: If LoadImage(0, #PB_Compiler_Home+"examples/sources/Data/File.bmp") ; change path/filename to your own 32x32 pixel image SetGadgetAttribute(5, #PB_ListIcon_DisplayMode, #PB_ListIcon_LargeIcon) AddGadgetItem(5, 0, "Picture 1", ImageID(0)) AddGadgetItem(5, 1, "...
by infratec
Wed Apr 10, 2024 9:48 pm
Forum: Coding Questions
Topic: EditorGadget Problem with RTF
Replies: 6
Views: 322

Re: EditorGadget Problem with RTF

Code: Select all

SendMessage_(GadgetID(Histo_0), #EM_SETTEXTMODE, #TM_RICHTEXT, 0)
https://www.purebasic.fr/english/viewto ... 10#p605710
by infratec
Wed Apr 10, 2024 2:55 pm
Forum: Bugs - Mac OSX
Topic: [Done] 6.10 LTS Crashes on Sonoma 14.4.1
Replies: 21
Views: 667

Re: 6.10 LTS Crashes on Sonoma 14.4.1

Yes.
But I also have access to a M1 and there it is working too.
by infratec
Wed Apr 10, 2024 2:39 pm
Forum: Bugs - Mac OSX
Topic: [Done] 6.10 LTS Crashes on Sonoma 14.4.1
Replies: 21
Views: 667

Re: 6.10 LTS Crashes on Sonoma 14.4.1

My X-Code version is 15.3
by infratec
Wed Apr 10, 2024 2:13 pm
Forum: Bugs - Mac OSX
Topic: [Done] 6.10 LTS Crashes on Sonoma 14.4.1
Replies: 21
Views: 667

Re: 6.10 LTS Crashes on Sonoma 14.4.1

Hm ...

works here without problems.
by infratec
Tue Apr 09, 2024 2:15 pm
Forum: Coding Questions
Topic: Pushbutton Test Toggling
Replies: 8
Views: 276

Re: Pushbutton Test Toggling

You have to be sure you pass only 0 for false and -1 for True, otherwise it will not worik correct! Since #False is 0 and everything else is true, it works up to now. What else will you use as false? Yes, it will fail if Fred changes the constants: #False = 1 #True = 2 Or if he checks if true is ex...
by infratec
Tue Apr 09, 2024 2:09 pm
Forum: Coding Questions
Topic: DLL returning an integer
Replies: 8
Views: 418

Re: DLL returning an integer

Read the help for CallFunction()

Code: Select all

integ.i=CallFunction(0,"MyFourthFunction")
But you should use Import or Prototypes and not CallFunction.