Search found 11 matches

by RK_aus_S
Fri Jun 21, 2024 7:53 am
Forum: Coding Questions
Topic: http post request with a header and a json body?
Replies: 13
Views: 1529

Re: http post request with a header and a json body?

I'm very sorry about that. I apologize.
I definitely got this requierements which mentioned "JSON Body". Of course I see now, this was misleading extremely, but I didn't know better.
Sorry again!

But now it works! It's great when experienced users can solve a problem so quickly (as long as they ...
by RK_aus_S
Fri Jun 21, 2024 6:57 am
Forum: Coding Questions
Topic: http post request with a header and a json body?
Replies: 13
Views: 1529

Re: http post request with a header and a json body?

Thank you very much, but you are speaking a bit too "high level" for me...
In my opening post, I didn't code the body as JSON but rather as a map like the header - but that didn't work either.
How do I have to code the body correctly, I'm clueless...?

BTW, I'm not a programmer, neither ...
by RK_aus_S
Fri Jun 21, 2024 6:28 am
Forum: Coding Questions
Topic: http post request with a header and a json body?
Replies: 13
Views: 1529

Re: http post request with a header and a json body?

Thanks to all.

I know the API documatation - and unfortunately, none of your tips worked.

I used the Postman API Tool https://www.postman.com/home to check the specified values for the header and the body - and it works very well. it even works, when the body format is "form-data" instead of "x ...
by RK_aus_S
Thu Jun 20, 2024 6:44 pm
Forum: Coding Questions
Topic: http post request with a header and a json body?
Replies: 13
Views: 1529

Re: http post request with a header and a json body?

Thank you.
I tryied something like this, but have still no success:


If CreateJSON(0)
Account = SetJSONObject(JSONValue(0))
SetJSONString(AddJSONMember(Account, "user[email]"), "my_name@gmail.com")
SetJSONString(AddJSONMember(Account, "user[password]"), "xxxxxxxx")
Body$ = ComposeJSON(0, #PB ...
by RK_aus_S
Thu Jun 20, 2024 6:11 pm
Forum: Coding Questions
Topic: http post request with a header and a json body?
Replies: 13
Views: 1529

http post request with a header and a json body?

Hello
I'm absolute new in PureBasic and struggle to get a working http post request.

This is the requirement I got for the http post:

URL: https://enlighten.enphaseenergy.com/login/login.json?serialnumber=xxxxxxxxx

Header:
"Accept": "application/json",
"content-type": "application/x-www-form ...
by RK_aus_S
Thu Apr 20, 2023 9:50 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Re: Checks to see if a specified window exists?


PureBasic > AutoIt. Anything AutoIt can do, so can PureBasic; and more. Welcome to the forum!


I hope that!
I can't expect that PureBasic will deliver all the comparable functions of AutoIt, there will certainly be "only" a more or less big overlap (and vica-versa).
But AutoIt also has pretty ...
by RK_aus_S
Thu Apr 20, 2023 9:42 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Re: Checks to see if a specified window exists?


You should understand The PureBasic window number isn't the same as Window Handle.

The underscore means Windows functions, you can search on the windows API:

https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindow


Thanks a lot. I appreciate the valuable help from all ...
by RK_aus_S
Thu Apr 20, 2023 9:37 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Re: Checks to see if a specified window exists?


Use:
SetWindowPos_(FindPartialWindow("myWindow"),#HWND_TOPMOST,0,0,0,0,#SWP_NOMOVE|#SWP_NOSIZE)


Thanks, that worked!

By the way; why can I not find some functions in the help (*.chm) file? For example, I can't find this functions in the help:


GetWindow_()
GetDesktopWindow_()
SetWindowPos ...
by RK_aus_S
Thu Apr 20, 2023 9:23 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Re: Checks to see if a specified window exists?


Hi, you can use something like that:
Procedure FindPartialWindow(part$)
r=GetWindow_(GetDesktopWindow_(),#GW_CHILD)
Repeat
t$=Space(999) : GetWindowText_(r,t$,999)
If FindString(t$,part$,1)<>0
w=r
Else
r=GetWindow_(r,#GW_HWNDNEXT)
EndIf
Until r=0 Or w<>0
ProcedureReturn w
EndProcedure ...
by RK_aus_S
Thu Apr 20, 2023 8:44 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Re: Checks to see if a specified window exists?

Wow. Thanks to RASHAD and Caronte3D

Now, I have a solution for partial as well as for full window title string.
That's an enjoyable start to PureBasic. :)

Regards
by RK_aus_S
Thu Apr 20, 2023 8:08 am
Forum: Coding Questions
Topic: Checks to see if a specified window exists?
Replies: 17
Views: 1469

Checks to see if a specified window exists?

Hi

I'm new with PureBasic and wonder, if there exists a fuction (or a simple solution) which checks to see if a specified window exists ?

In the past years, I worked a lot with AutoIt Script . But I was impressed of PureBasic and want to give it a try. I don't want to compare AutoIt with PureBasic ...