Search found 66 matches

by nblackburn
Tue Sep 08, 2015 9:00 pm
Forum: Coding Questions
Topic: Weird Maths
Replies: 5
Views: 1528

Re: Weird Maths

Thanks, this was really off putting :)
by nblackburn
Tue Sep 08, 2015 8:56 pm
Forum: Coding Questions
Topic: Weird Maths
Replies: 5
Views: 1528

Weird Maths

In PureBasic i am trying to do some calculations to determine the height of something but for some reason the following returns zero, any thoughts?

Calculation: (100 / 498) * 491 = 98.59437751
PureBasic: Debug (100 / 498) * 491 = 0

This is very strange to me and am not sure what is going wrong :?
by nblackburn
Sun Sep 06, 2015 10:47 pm
Forum: Announcement
Topic: Realtime Bar Chart
Replies: 3
Views: 3386

Re: Realtime Bar Chart

Oops, that will be it, nice catch!
by nblackburn
Sun Sep 06, 2015 10:36 pm
Forum: Announcement
Topic: Realtime Bar Chart
Replies: 3
Views: 3386

Realtime Bar Chart

Fellow people of the internet,

As some of you may know, i bought PureBasic some time ago but never really have done much with it so i wanted to make something this weekend to give back to the community.

Using the awesome vector library available in the latest update to PureBasic, i have created a ...
by nblackburn
Thu Sep 25, 2014 10:45 am
Forum: Feature Requests and Wishlists
Topic: JSON PrettyPrint
Replies: 0
Views: 1562

JSON PrettyPrint

Hello,

Great work on the JSON library but feel it could benefit from a few more features as it very much is cumbersome to work with without knowing the structure of the document. One of my suggestions would be to allow for more options to be passed to the pretty print function via the use of a new ...
by nblackburn
Tue Sep 23, 2014 1:12 pm
Forum: Coding Questions
Topic: Piracy - Combating jack sparrow & evil forces
Replies: 15
Views: 5852

Re: Piracy - Combating jack sparrow & evil forces

I would suggest to keep as much of your protection online as it is more secure and less likely to be attacked than a piece of software as you have a certain level of protection and control over it's distribution.

P.S - a bug is an unexpected behavior so how to you plan to introduce bugs without ...
by nblackburn
Tue Sep 23, 2014 8:57 am
Forum: Coding Questions
Topic: Nested JSON structures
Replies: 2
Views: 1201

Re: Nested JSON structures

Thanks, i will give this a go and report back on my progress.
by nblackburn
Mon Sep 22, 2014 12:42 pm
Forum: Coding Questions
Topic: Nested JSON structures
Replies: 2
Views: 1201

Nested JSON structures

I appear to have found myself in need of help in figuring out how retrieve the contents of a nested json map.


{
"total": 2,
"jake": {"gender": "male", "age": 26},
"jane": {"gender": "female", "age": 24}
}


The data above is an example of the kind of structure i could be dealing with.

How ...
by nblackburn
Sat Feb 22, 2014 6:08 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

Awesome, thanks a lot for everyone's help.
by nblackburn
Fri Feb 21, 2014 7:14 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

I have read they can be nasty, but this seems to be the only way to monitor and respond to mouse movement that isn't bound the the currently running application.
by nblackburn
Fri Feb 21, 2014 7:04 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

Your code works fine and now I understand what is not working, you are registering a local hook (application window) where as I am trying to register a global one (operating system) which isn't working.
by nblackburn
Fri Feb 21, 2014 6:45 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

Forgot the mention that I accidentally imported the DLL which obviously wont work.

Just discovered PureBasic doesn't compile it's temp exe to the working directory so it couldn't find the DLL needed. That hurdle is overcome but the function doesn't return anything to the console, like the code ...
by nblackburn
Fri Feb 21, 2014 6:41 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

Import "hook.lib"
RegisterHook(type, callback, instance=0, thread=0)
EndImport

Procedure HookMouse(nCode, wParam, lParam)
Debug nCode
EndProcedure

RegisterHook(#WH_MOUSE, @HookMouse()) ; problem happens here!

The problem happens when I try and call the functions defined in the import.
by nblackburn
Fri Feb 21, 2014 6:32 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Re: Writing a DLL

Do you need to use polink.exe to have a standalone lib?

The one compiled with the DLL requires the DLL which is giving me the invalid machine type error.
by nblackburn
Fri Feb 21, 2014 6:02 pm
Forum: Coding Questions
Topic: Writing a DLL
Replies: 19
Views: 7072

Writing a DLL

I have tried creating a DLL that registers and unregisters windows event hooks, but when compiling and calling the library i always get an error.

ProcedureDLL RegisterHook(type, callback, instance=0, thread=0)
ProcedureReturn SetWindowsHookEx_(type, callback, instance, thread)
EndProcedure ...