AutoHotkey Community

It is currently May 26th, 2012, 9:48 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: October 3rd, 2008, 9:55 pm 
Offline

Joined: October 24th, 2007, 10:27 pm
Posts: 24
Hi,

I have a project that requires a lot of manipulation of a very big string (100k or more).

In AHK this is slow (about 10 secounds) each time.

I am considering doing this processing in C++.

Please has someone a step by step example of how to

1) create a simple DLL in C++ (i.e. just accept a string, change it slightly and return it).
2) how to call this DLL from AHK passing to it a string parameter (perhaps a really big string).
3) get hold of this changed string from AHK into a AHK variable.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2008, 12:09 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
What kind of manipulation? Maybe your current method is inefficient.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2008, 7:35 am 
Offline

Joined: October 24th, 2007, 10:27 pm
Posts: 24
I'm scanning a very big string and putting in rich text format commands depending on what is in the string. Stringreplace commands won't do what i'm after. Due to what I have to do there is no choice but to scan each character and manipulate the string programmatic ally, hence the need for a C++ dll.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2008, 10:02 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Have you tried using RegEx? It's written in C.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2008, 1:35 pm 
Q wrote:
Due to what I have to do there is no choice but to scan each character and manipulate the string programmatic ally, hence the need for a C++ dll.

Here is a link to a step-by-step guide/tutorial to creating DLL's in C++. Creating And Using DLLs


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 4th, 2008, 7:52 pm 
Offline

Joined: October 24th, 2007, 10:27 pm
Posts: 24
Thanks for that,

But what I was really looking for was an example of AHK passing a parameter string to a dll. Doing somtething with that string in the dll and returning the string back through the parameter to AHK. Preferrably an example calling the dll with AHK and the dll programmed in c++ express.

The example above just outputs to the console.

I know I may be expecting a lot, but as much as I have tried, I have been so far unable to achieve this.

Someone please please help with an example of this, please.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], iBob35555VR, just me, krajan and 65 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group