Habs geändert.
& Bedeutet also BitAND. Aber ich bekomm immer noch nicht das richtige raus !
Habs geändert.
& Bedeutet also BitAND. Aber ich bekomm immer noch nicht das richtige raus !
Wie ich´s dir erzählt habe die Build exe Kompilt sich nicht bei mir.
Sehr nice geworden. Nur das GUI müsste im OnEvent Modus laufen !
Hi,
Ich habe im Internet einen kleine PHP Verschlüsslungs Algorythmus gefunden. Diesen habe ich halbwegs übersetzt bekommen nur bekomme ich etwas völlig anderes raus als bei der PHP Datei.
Ich hoffe ihr könnt mir helfen.
Hier ist der PHP Algorythmus
<?php
// String EnCrypt + DeCrypt function
// Author: halojoy, July 2006
// Modified and commented by: laserlight, August 2006
function convert($text, $key = '') {
// return text unaltered if the key is blank
if ($key == '') {
return $text;
}
// remove the spaces in the key
$key = str_replace(' ', '', $key);
if (strlen($key) < 8) {
exit('key error');
}
// set key length to be no more than 32 characters
$key_len = strlen($key);
if ($key_len > 32) {
$key_len = 32;
}
$k = array(); // key array
// fill key array with the bitwise AND of the ith key character and 0x1F
for ($i = 0; $i < $key_len; ++$i) {
$k[$i] = ord($key{$i}) & 0x1F;
}
// perform encryption/decryption
for ($i = 0, $j = 0; $i < strlen($text); ++$i) {
$e = ord($text{$i});
// if the bitwise AND of this character and 0xE0 is non-zero
// set this character to the bitwise XOR of itself and the jth key element
// else leave this character alone
if ($e & 0xE0) {
$text{$i} = chr($e ^ $k[$j]);
}
// increment j, but ensure that it does not exceed key_len-1
$j = ($j + 1) % $key_len;
}
return $text;
}
echo convert('To be or not to be, that is the question', 'mysecretkey');
?>
Alles anzeigen
und hier mein Versuch
#include <String.au3>
#include <Array.au3>
; -1 Key Error
MsgBox(0, "", Convert("12rtt3", "1234567hhhhh89zz"))
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func Convert($str, $ky)
If $ky = "" Then Return $str
$ky = StringReplace($ky, Chr(32), '')
If StringLen($ky) < 8 Then Return -1
If StringLen($ky) < 32 Then
$kl = StringLen($ky)
Else
$kl = 32
EndIf
Local $TmpArr[$kl]
For $i = 0 To $kl - 1
$TmpArr[$i] = BitXOR(Ord(StringMid($ky, $i, 1)), 0x1F)
Next
;~ _ArrayDisplay($TmpArr)
$j = 0
For $i = 0 To StringLen($str) - 1
$e = Ord(StringMid($str, $i, 1))
If BitXOR($e, 0xE0) Then $str = StringReplaceCount($str, Chr($e ^ $TmpArr[$j]), $i)
[/autoit] [autoit][/autoit] [autoit]$j = Mod(($j + 1), $kl)
Next
Return $str
EndFunc ;==>Convert
Func Ord($sStr)
Return Asc(StringLeft($sStr, 1))
EndFunc ;==>Ord
Func StringReplaceCount($sStr, $subString, $Index)
$sStr = StringSplit($sStr, "")
$sStr[$Index] = $subString
Return _ArrayToString($sStr, "")
EndFunc ;==>StringReplaceCount
Schon mal danke für die Antworten !
//Edit: Zum schluss müsste die Ausgabe beim Autoit Script so
aussehen
Sehr schik ! Selber gestrickt?
Herzlich willkommen !
Nice geworden.
Aber
ZitatAlles anzeigen
D:\Desktop\AutoIt v3 Script (neu).au3(87,41) : WARNING: $hGraphics_gdi: possibly used before declaration.
_GDIPlus_GraphicsFillRect($hGraphics_gdi,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\Desktop\AutoIt v3 Script (neu).au3(94,39) : WARNING: $Progressgui_Gui: possibly used before declaration.
GUISetState(@SW_HIDE, $Progressgui_Gui)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\Desktop\AutoIt v3 Script (neu).au3(70,69) : WARNING: $hGraphics_gdi: declared global in function only. Prefer top of file.
Global Const $hGraphics_gdi = _GDIPlus_GraphicsCreateFromHWND($hWnd)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Aber das lässt sich verhindern indem du
[autoit]Global $hGraphics_gdi,$Progressgui_Gui
[/autoit]
an den Anfang setz
und in der Funktion _Progress_ON verändere mal
[autoit]
Global Const $Progressgui_Gui = GUICreate($GuiNamen, 650, 80, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST )
Global Const $hGraphics_gdi = _GDIPlus_GraphicsCreateFromHWND($hWnd)
in
[autoit]
$Progressgui_Gui = GUICreate($GuiNamen, 650, 80, -1, -1, $WS_POPUPWINDOW, $WS_EX_TOPMOST )
$hGraphics_gdi = _GDIPlus_GraphicsCreateFromHWND($hWnd)
dann kommen keine errors mehr
und setze mal deinen Code in ['spoiler][/spoiler] (Später dann ohne ' ) Tags damit mann sich keinen Wolf dreht beim scrollen
Herzlich willkommen !
Ich schätze, dass ich hier im Forum mit zu den älteren Teilnehmern zähle.
Das dürfte doch kein Problem werden, oder?
Hier ist wiklich fast alle Jahrgägne vertreten (11-60).
Da fällt mir spontan nur das ein (Link)
die Frage ist allerdings immernoch, warum Koda z.B. die falschen Includes erzeugt!?
Bei mir hats noch nie falsche erzeugt. Höchstens unwichtige. Aber vlt ist deine Koda Version alt. Lade dir mal die neue. (Link)
Guck dir mal
[autoit]DirCopy
[/autoit]an. (Einfach auf FileCopy klicken dann kannste Parameter usw sehen)
//Edit: Zu spät :pinch:
Alles gute zum B-Day !
Funzt Win7 x86. Der Bildschirm bleibt schwarz bis man die Maus bewegt oder die 3 Sekunden abgelaufen sind.
Sag mal ist das nicht das Beispiel aus der Hilfe ?
Das Bild in der UDF ist ja ganz schön. Aber wofür braucht mann sowas ?