AutoHotkey Community

It is currently May 27th, 2012, 4:22 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 37  Next
Author Message
 Post subject:
PostPosted: February 23rd, 2010, 11:10 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
The disassembly looks normal. Do you have an old version of Gtk# installed? Try changing the example code to:

Code:
MsgBox, 0, Title, Text, 100

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 23rd, 2010, 11:15 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
Well, I happen to have an old Gtk# version installed. I guess tomorrow I'll update.
Thanks :)

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2010, 3:47 am 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Here is a fix for the feature infogulch requested.

Code:
public static int InStr(string Haystack, string Needle, string CaseSensitive, int StartingPos, int Count)
{
    StringComparison type = CaseSensitive == null ?
        StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
    int x = StartingPos;

    if (StartingPos < 0)
    {
        StartingPos = Math.Abs(StartingPos);
        while (--Count > 0)
            StartingPos = Haystack.LastIndexOf(Needle, StartingPos + 1, type);
    }
    else
        while (--Count > 0)
            StartingPos = Haystack.IndexOf(Needle, StartingPos + 1, type);

    return x < 1 ? -StartingPos : StartingPos;
}


It is based off of a function he and I were racing to create. Sadly, he won. I was not sure whether to return a negative or positive offset when a negative StartingPos was sent, but I went with negative.

The function in AutoHotkey:

Code:
_InStr(Haystack, Needle, CaseSensitive = False, StartingPos = 1, Count = 1) {
   If (StartingPos < 1) {
      DllCall("msvcrt.dll\_strrev", "Str", Haystack, "CDecl Str")
      DllCall("msvcrt.dll\_strrev", "Str", Needle, "CDecl Str")
      StartingPos := Abs(StartingPos)
   }
   
   While (--Count > 0)
      StartingPos := InStr(Haystack, Needle, CaseSensitive, StartingPos + 1)
      
   Return StartingPos
}

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 24th, 2010, 5:13 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
Even though I updated Gtk# for .NET to 2.12.9-2, I still get an error message.
If I uninstall it I'm able to run the test script, but I need Gtk# for MonoDevelop.

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 25th, 2010, 9:44 pm 
Offline

Joined: June 1st, 2007, 2:00 pm
Posts: 180
I want to learn. I will stay here.

Best Regards


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 9:07 pm 
Offline

Joined: May 10th, 2009, 7:30 pm
Posts: 45
Should the COM library work yet?

I get this error when trying to compile. The .ahk is saved as UTF-8. I've tried with the original COM and the unicode one for Ahk_L.

Code:
<0>: ==> Could not look up method COM_Init


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 10:41 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
The COM_L Library isn't designed to work with IronAHK. However, in the op Titan wrote:
Quote:
Future changes will include ... Easier integration with other .NET assembles and COM

Also, I was wondering Titan, are you planning on extending object support to reflect javascript more? For instance:
Code:
ages[] := x ; extend array

; change so that the following works

ages[2] := x ; extend array

And I suppose I could study JSON more, but are you planning on implementing any sort of metafunctions - like AHKL?

_________________
Image
Recommended: AutoHotkey_L
Basic Webpage Controls


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 11:44 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
JohnnyTwoTone wrote:
Should the COM library work yet?
jethrow wrote:
The COM_L Library isn't designed to work with IronAHK
Specifically the StdLib mechanism does not yet work because I haven't decided where the directories should be on Unix, ~/ahk, /usr/lib/ahk $AHKLIBPATH, or all three places? Until then you can try manually including the COM script or copying the code to your file. From what I remember it heavily relies on DllCall at memory addresses which is also currently unimplemented. I will make this a target for the next release however.

jethrow wrote:
are you planning on extending object support to reflect javascript more?
Arrays can only be extended by one using [], an idea taken from PHP which does not work in JavaScript. Objects can be freely extended with any keys like ages["bob"] := x (equivalent to ages.bob := x). There are technical reasons for this which will be documented at some point but it is also to distinguish the functionality of the two types.

jethrow wrote:
are you planning on implementing any sort of metafunctions - like AHKL?
I haven't used AHKL or studied its features but there are plans for extension methods.

_________________
GitHubScriptsIronAHK Contact by email not private message.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2010, 1:15 am 
Offline

Joined: April 8th, 2008, 1:08 am
Posts: 100
Location: Minnesota, USA
Image

_________________
-trueski-


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2010, 2:21 am 
Offline

Joined: August 21st, 2006, 7:07 pm
Posts: 2925
Location: The Shell
:lol: Nice one

_________________
Imageparadigm.shift:=(•_•)┌П┐RTFM||^.*∞


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 6th, 2010, 9:51 am 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
Quote:
haven't decided where the directories should be on Unix, ~/ahk, /usr/lib/ahk $AHKLIBPATH, or all three places?

I would appreciate if it is going to be configurable.
  • + additional paths: $AHKADDPATH
  • o user library: /usr/lib
  • o standard library: %A_AhkPath%/lib
in that order. The user can configure the envpath only.

The addpath is adding paths to the normal environment, for commands such Run etc. Also the library is searched in one of these pathes. Thats the idea (I do not really feel confident with this yet).

_________________
{1:"ahkstdlib", 2:"my libs", 3:"my apps", 4:"my license"}
--> Don't feed the troll! <--


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2010, 11:00 am 
Offline

Joined: July 3rd, 2004, 1:03 pm
Posts: 121
Oh my goodness. IronAHK is like some kind of wet dream. Fantastic!


Report this post
Top
 Profile  
Reply with quote  
 Post subject: WTF?
PostPosted: March 9th, 2010, 5:03 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
So this http://www.autohotkey.com/forum/viewtopic.php?p=241769 should be a thing of the past because it makes AHK 64 bit so the registry will get written to without complication or having to do this or that.. Right?

And with the bytecode compile, I should be able to digitally sign my apps without them getting corrupted... Right??

And now this http://www.autohotkey.com/forum/viewtopic.php?t=27146 was a sad waist of super Micha's time... Right???

Wow, the power of .NET in an easy to learn and understand AHK programming language, we all owe you our first born!

Now, before I upgrade all my clients to this, I will just need some way to make sure they have .NET 2.0 or higher.

I will compile and test and let you know if I find any problems.

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 5:23 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
I found a script, written by someone esle, that does not work,
Code:
#SingleInstance force
#NoTrayIcon
#NoEnv
DateTimeStamp = %A_Year%%A_Mon%%A_DD%000000
HMS = 00:00:00.0
StringLeft, Day, A_DD, 1
If Day = 0
   StringRight, Day, A_DD, 1
Else Day := A_DD
Gui, Color, EEAA99
Gui, +Lastfound -Caption +AlwaysOnTop
WinSet, TransColor, EEAA99
Gui, Font, s10
Gui, Add, Button, w50 gUp, UP
Gui, Add, Button, w50 gDown x+30 ym, DOWN
Gui, Add, Text, x+10, %A_DDDD%`n%A_MMM%. %Day%
Gui, Font, w1000 s30
Gui, Add, Text, xm vtime, %HMS%
Gui, Font, s10
Gui, Add, Text, xm cBlue vAHK gAHK, AHK
Gui, Font, w400
Gui, Add, Button, x+15 vStop gStop, EXIT
Gui, Add, DDL, w22 x+5 vColor gColor
, Clear||Default|Aqua|Blue|Fuchsia|Gray|Green|Lime|Maroon|Navy|Olive|Purple|Red|Silver|Teal|White|Yellow
Gui, Add, Text, x+50, %A_YYYY%
Gui, Show, x60 y40, StopWatch
WinGetPos,,,w1
SetTimer, Focus
SetTimer, Blink, 500
return
GuiClose:
ExitApp
;
;#########
;#gLabels#
;#########
;
Up:
SetTimer, Count, 100
up = 1
TimerOn = 1
SetTimer, Blink, Off
GuiControl, Show, time
GuiControl,, Stop, STOP
return
Down:
SetTimer, Count, 100
up = 0
TimerOn = 1
SetTimer, Blink, Off
GuiControl, Show, time
GuiControl,, Stop, STOP
return
Color:
Gui, Submit, NoHide
If Color = Clear
{
   Color = EEAA99
   Gui, -Caption
}
Else Gui, +Caption
Gui, Color, %Color%
Loop
{
   Gui, Show, AutoSize
   WinGetPos,,,w2
   If (w2 >= w1)
      break
}
return
AHK:
Run, http://www.autohotkey.com/forum/viewtopic.php?t=13884
return
;
;#########
;##Timer##
;#########
;
Count:
If up
{
   tenth++
   If tenth > 9
   {
      DateTimeStamp += 1, seconds
      tenth = 0
      FormatTime, HMS, %DateTimeStamp%, HH:mm:ss
   }
}
Else
{
   tenth--
   If tenth < 0
   {
      DateTimeStamp += -1, seconds
      tenth = 9
      FormatTime, HMS, %DateTimeStamp%, HH:mm:ss
   }
   If (red != 1) AND (HMS = "00:00:00") AND (tenth = 0)
   {
      SoundBeep
      Gui, Font, Norm cRed w1000 s30
      GuiControl, Font, time
      red = 1
      up = 1
   }
}
GuiControl,, time, %HMS%.%tenth%
return
;
;#########
;##Stop###
;#########
;
Stop:
If timerOn
{
   SetTimer, Count, Off
   timerOn = 0
   If red = 1
   {
      Gui, Font, Norm cBlack w1000 s30
      GuiControl, Font, time
      red = 0
   }
}
Else
{
   GuiControlGet, ButtonName,, Stop
   If ButtonName = Exit
      ExitApp
   DateTimeStamp = %A_Year%%A_Mon%%A_MDay%000000
   HMS = 00:00:00.0
   tenth = 0
   GuiControl,, time, %HMS%
   GuiControl,, Stop, EXIT
   SetTimer, Blink, On
}
return
;
;#########
;##Blink##
;#########
;
Blink:
If toggle
 toggle = 0
Else toggle = 1
GuiControl, Hide%toggle%, time
return
;
;#########
;##DDL####
;#########
;
Focus:
GuiControlGet, focus, Focus
If (focus = "ComboBox1") AND (expand != 1)
{
   GuiControl, Move, Color, w70
   Control, ShowDropDown,, ComboBox1, StopWatch
   expand = 1
}
Else If (focus != "") AND (focus != "ComboBox1") AND (expand = 1)
{
   GuiControl, Move, Color, w22
   expand = 0
}
MouseGetPos,,,,focus
If (focus = "Static3") AND (Static3 != 1)
{
   Static3 = 1
   Gui, Font, Norm s10 w1000 c6495ED underline
   GuiControl, Font, AHK
}
Else If (focus != "Static3") AND (Static3 = 1)
{
   Static3 = 0
   Gui, Font, Norm s10 w1000 cBlue
   GuiControl, Font, AHK
}
return

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 9th, 2010, 7:16 pm 
Offline

Joined: April 30th, 2006, 6:23 pm
Posts: 358
Location: Shigle Springs
from CMD,
Quote:
c:\ironAHK>IronAHK.exe decript.ahk
(0): ==> Object reference not set to an instance of an object.
decript.ahk (138): ==> Unclosed block
Could not execute: compilation failed

After some google time for "Object reference not set to an instance of an object. ", I tried the fix here, http://support.microsoft.com/kb/810098 and after finding and downloading http://www.smartertools.com/downloads/U ... acutil.zip AND after getting C:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll from another PC and puting it on mine, I got this.
Quote:
C:\>C:\WINDOWS\Microsoft.NET\Framework\v1.0.3
705\gacutil /i C:\Program Files\Microsoft.NET\Primary Interop Assemblies\adodb.dll
Falure initializing gacutil

I will PM you the code from decript.ahk because it's private.

_________________
CPULOCK.com
virusSWAT.com
Computer Repair Computer Service.com
911PCFIX.com


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 552 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 37  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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