
BennyBB
Active Members-
Posts
24 -
Joined
-
Last visited
BennyBB's Achievements

Seeker (1/7)
0
Reputation
-
Hey, does someone know a free web server or webhost, which supports AuCGI? I'm really looking for a good place to upload my AuCGI related stuff and hope that someone knows a solution . Thanks in advance
-
That's rather awesome. We have a school project where we have to build up our own website and most of us are just beginners in Webcoding but with the AuCGI almost everything I was looking for is possible and all this without learning any real server side language such as php or ASP. This fact saved me a lot of time Sadly I didn't find this back in the time I began with AutoIT, It would have safed me a lot of time, work and disappointment. Just saying it in one sentence : thanks to everyone who has helped to develope this in the past 4 years EDIT: BTW I found a small error. If you use a larger HTML Document without any autoit in it it will cause an ,,unterminates string" and crash. this is how I fixed it: Func _parseSource($source) Local $idx = 1, $idx2, $lastidx = 1, $parsed = "", $chunk = "" Do ; get first code snippet $idx = StringInStr($source, "<?au3", 0, 1, $idx) If $idx Then If $idx > $lastidx Then ; we have html $chunk = StringMid($source, $lastidx, $idx - $lastidx) ; get it $parsed &= 'ConsoleWrite("' & StringReplace(StringReplace($chunk, '"', '""'), @CRLF, '" & @CRLF & "') & '")' & @CRLF ; write it EndIf $idx += 5 ; start of code ; get end of code tag $idx2 = StringInStr($source, "?>", 0, 1, $idx) If $idx2 Then ; found end of code $chunk = StringMid($source, $idx, $idx2 - $idx) ; get it $parsed &= $chunk & @CRLF ; write it $lastidx = $idx2 + 2 ; new $lastidx value, set to position after end-code tag $idx = $lastidx ; next search start location Else ; parse error, get out _error("Error parsing source.") EndIf Else ; no code sections or last section of html $chunk = StringMid($source, $lastidx) ; get it If $chunk Then _ ; check we actually have something this time $splitted = StringSplit($chunk,@CRLF,1) For $b = 1 to $splitted[0] Step 1 If StringInStr($splitted[$b],"</html>") > 0 Then ;end of document $parsed &= 'ConsoleWrite("' & StringTrimRight($splitted[$b],StringLen($splitted[$b])-StringInStr($splitted[$b],"</html>",1)) & '/html>")' ExitLoop EndIf $parsed &= 'ConsoleWrite("' & StringReplace($splitted[$b], '"', '""') & '" & @CRLF)' & @CRLF Next EndIf Until Not $idx Return $parsed EndFunc ;==>_parseSource you could check that and if necessary add it to the file in the first post
-
Help me, please
-
Hey there, I want to mess around a bit with objects and so on in autoit so I decided to write a small script which ineracts with ICQ In the helpfile it says : ObjCreate ( "classname") But where do I get the classname to work with ICQ (I have ICQ 7 ) I even messed around with "OLE/COM Object Viewer" and I had a look inside the ICQ DLL's but still no clue how the classname is. Even au3info cant help me : Is the "__oxFrame.class__" important? and in case it is, how do I use it? Hopefully one of you can help me BennyBB
-
you can change values into hex with Hex(your number) You can work with Hex numbers by adding 0x So it has to look like this: $result = Hex(1033,4) ;returns "0409" $hex_value = "0x" & $result ; returns "0x0409" Next time look ot up in the helpfile
-
Can Arrays be coppied into each other?
BennyBB replied to Shadowram's topic in AutoIt General Help and Support
Do you mean sth like this? Dim $test_ac = $test_ab _ArrayDisplay($test_ac) -
Just leafe out the index. If you just use Global $test_ab[10] = ["test_ab", "t", 2500, 0, 0, 0, 0, 110] Function("test_ab") $question = Eval("test_ab") EndFunc then $question IS an array containing all elemnts of the $test_ab array and then you can just do it with the index for example $question[2]
-
It was in your code: $Pic1 = GUICtrlCreatePic("C:\Documents and Settings\ras00l\My Documents\My Pictures\iBot_starter_background.JPG", 0, 0, 403, 373, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))<---- your original code I commented it out, because it's just useful if you have tab or listview items in your gui. and about the zip file... I THINK it should work, I've never tested it and i've never done it since now^^
-
[Help] My Autoit Don't Compile/Build
BennyBB replied to MatheusGM's topic in AutoIt General Help and Support
I'm using Win Vista and it works fine for me ... the script and the compiled exe both work -
Hey, This should work now... sry I edited the picture so that I can test it on my PC: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form1", 402, 372) $Pic1 = GUICtrlCreatePic("C:\Users\Benny\Desktop\DSC00101.JPG", 0, 0, 403,372, BitOR($SS_NOTIFY,$WS_GROUP));,$WS_CLIPSIBLINGS)) GUICtrlSetState(-1,$GUI_DISABLE) #EndRegion ### END Koda GUI section ### ;Labels / Groups. GUICtrlCreateGroup("Pre-Config", 16, 208, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) GUICtrlCreateGroup("Account Info", 16, 48, 377, 145) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT ) ;Buttons. $Button_Start = GUICtrlCreateButton("Start", 8, 8, 73, 25, 0) $Button_Stop = GUICtrlCreateButton("Stop", 88, 8, 73, 25, 0) $Button_SaveTemp = GUICtrlCreateButton("Save Temp Files", 168, 8, 97, 25, 0) $Button_Help = GUICtrlCreateButton("Help", 272, 8, 57, 25, 0) $Button_Exit = GUICtrlCreateButton("Exit", 336, 8, 57, 25, 0) $Button_DelTempFiles = GUICtrlCreateButton("Del Temp Files", 288, 128, 91, 25, 0) $Button_Searchibot = GUICtrlCreateButton("Search", 24, 256, 75, 25, 0) $Button_SearchLoader = GUICtrlCreateButton("Search", 24, 320, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE _Check4CLOSEClicked() EndSwitch WEnd Func _Check4CLOSEClicked();Exit $answer = MsgBox(4, "Wanning", "Are you soure?", 8 ) If $answer = 6 Then Exit EndIf EndFunc But please next time, use the Helpfile: And now to your second question: If you want that the picture is also seen on pc's which normaly do not have the picture, I would advise you to put the script AND the picture into a zip file and then you should add this line in your code : $pic = GuiCtrlCreatePic(@ScriptDir & "\" & --Picturename-- ,left,top,width,height,.....) (This is not tested, but I think it should work ) Benny
-
Items from other tabs are showing though?
BennyBB replied to danielmohr91's topic in AutoIt GUI Help and Support
Hey this should work now. I've just set the color directly after creating the control and not at the end of the gui section: ;testing tab glitch with bk color #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Glitch", 441, 286, 192, 124) $Tab1 = GUICtrlCreateTab(40, 64, 369, 193) GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) $TabSheet1 = GUICtrlCreateTabItem("1") $Button2 = GUICtrlCreateButton("Am I covered?", 112, 128, 209, 105, $WS_GROUP) GUICtrlSetBkColor(-1, 0xD02875) $TabSheet2 = GUICtrlCreateTabItem("2") $Slider2 = GUICtrlCreateSlider(72, 96, 265, 41) GUICtrlSetBkColor(-1, 0xFFFFFF) $Button1 = GUICtrlCreateButton("Pink", 144, 216, 145, 25, $WS_GROUP) $TabSheet3 = GUICtrlCreateTabItem("3") $Slider1 = GUICtrlCreateSlider(72, 152, 305, 33) GUICtrlSetBkColor(-1, 0xFFFFFF) $Label1 = GUICtrlCreateLabel("Slider", 128, 128, 30, 17) GUICtrlCreateTabItem("") #EndRegion ### END Koda GUI section ### GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd -
As you can see in my post I've done it with arrays but now all this Eval () and Assign() stuff seems to be interesting for me
-
I think the 1st parameter for _ArraySearch has to be an variable (an array) here it is a string, I think. I've worked a bit with it and maybe this works, but probably you could give us some example values for $pr1list and so one, so that we can test our code... #include <Array.au3> #include <Math.au3> ;--------- My test values $pr0list = "2" $pr1list = "1,2" $pr2list = "344,55" $pr3list = "44,87" $urllist_array = 10 :--------------------- #cs ;If anybody has a solution for this problem...please let me know... :D For $i= 0 to 2 Step 1 $var = String($i) For $l=0 to $h2-1 ;Assign("prlist_array[$i][$l]","pr" & $var & "list_array[$i][$l]") $prlist_array[$i][$l] = Eval("pr" & $var & "list_array[$i][$l]") MsgBox(0,"",Eval("pr" & $var & "list_array[$i][$l]")) MsgBox (0,"",$prlist_array[$i][$l]) Next Next #ce $pr1list_array = StringSplit($pr1list, @LF, 2) ; I tested with "," instead of @LF $pr2list_array = StringSplit($pr2list, @LF, 2) $pr3list_array = StringSplit($pr3list, @LF, 2) $h1 = _Max(Ubound($pr1list_array),Ubound($pr2list_array)) $h2 = _Max($h1,Ubound($pr3list_array)) MsgBox(0,"",$h2) Dim $prlist_array[3][$h2+1] For $i=0 to Ubound($pr1list_array)-1 $prlist_array[0][$i] = $pr1list_array[$i] MsgBox(0,"",$pr1list_array[$i]) Next For $i=0 to Ubound($pr2list_array)-1 $prlist_array[1][$i] = $pr2list_array[$i] Next For $i=0 to Ubound($pr3list_array)-1 $prlist_array[2][$i] = $pr3list_array[$i] Next _ArrayDisplay($prlist_array) Dim $fpr[3] = [0,0,0] For $x = 1 To 3 For $w = 0 To UBound($urllist_array) - 1 If _ArraySearch($prlist_array[$x-1][...fill here in which index you want..], $urllist_array[$w]) > -1 Then ; Syntax error in Array to search ;"$fpr" & $x += 1 ; Syntax Error $fpr[$x-1] += 1 EndIf Next Next hope this works now
-
Hey, nice script For those who want a German one: Here it is: #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ComboConstants.au3> ; Opt("TrayMenuMode", 1) ;Global Const $Text_en = "ITLISASTIMEACQUARTERDCTWENTYFIVEXHALFBTENFTOPASTERUNINE" & _ ; "ONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" Global Const $Text_ger = "ESKISTAFÜNFZEHNBYGVORGNACHVIERTELHALBVORNACHEINSLMEZWEI" & _ "DREIAUJVIERFÜNFTOSECHSSIEBENLACHTNEUNZEHNELFZWÖLFUNKUHR" Global $Char_Text[111] Global $Char_Text_Remain[5], $Color_Chooser[6] Global $Text_en_Split = StringSplit($Text_ger, "") Global $Hour_Min = @HOUR & @MIN Global $Text_Min_Highlight[12][2] = _ [["00", "1|2|4|5|6|108|109|110"], _ ["05", "1|2|4|5|6|8|9|10|11|23|24|25|26"], _ ["10", "1|2|4|5|6|12|13|14|15|23|24|25|26"], _ ["15", "1|2|4|5|6|27|28|29|30|31|32|33|41|42|43|44"], _ ["20", "1|2|4|5|6|12|13|14|15|19|20|21|34|35|36|37"], _ ["25", "1|2|4|5|6|8|9|10|11|19|20|21|34|35|36|37"], _ ["30", "1|2|4|5|6|34|35|36|37"], _ ["35", "1|2|4|5|6|8|9|10|11|23|24|25|26|34|35|36|37"], _ ["40", "1|2|4|5|6|12|13|14|15|23|24|25|26|34|35|36|37"], _ ["45", "1|2|4|5|6|27|28|29|30|31|32|33|38|39|40"], _ ["50", "1|2|4|5|6|12|13|14|15|19|20|21"], _ ["55", "1|2|4|5|6|8|9|10|11|19|20|21"]] Global $Text_Hour_Highlight[12][2] = _ [["01", "45|46|47|48"], _ ["02", "52|53|54|55"], _ ["03", "56|57|58|59"], _ ["04", "63|64|65|66"], _ ["05", "67|68|69|70"], _ ["06", "73|74|75|76|77"], _ ["07", "78|79|80|81|82|83"], _ ["08", "85|86|87|88"], _ ["09", "89|90|91|92"], _ ["10", "93|94|95|96"], _ ["11", "97|98|99"], _ ["12", "100|101|102|103|104"]] Global $Color_Themes[5][3] = _ [["Black Ice Tea", 0x000000, 0x303030], _ ["Cherry Cake", 0xDC0817, 0xB80713], _ ["Vanilla Sugar", 0xC4C3C1, 0xA2A1A0], _ ["Frozen Blackberry", 0x503082, 0x6A4F93], _ ["Lime Juice", 0xA8AF0A, 0x8C9107]] $Selected_Theme = IniRead(@TempDir & "/QLOCKTWOSettings.ini", "Theme", "Selected", 0) Global $Text_Color_Dark = $Color_Themes[$Selected_Theme][2] Global $Text_Color_Lit = 0xFFFFFF Global $Form_BK_Color = $Color_Themes[$Selected_Theme][1] Global $Combo_Add #Region ### START Koda GUI section ### Form= $size = 20 $QclockTwoForm = GUICreate("QLOCK TWO", (13 * $size), (12 * $size), -1, -1) GUISetBkColor($Form_BK_Color) $k = 1 For $i = 1 To 10 For $j = 1 To 11 $Char_Text[$k] = GUICtrlCreateLabel($Text_en_Split[$k], $size * $j, $size * $i, 20, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) $k += 1 Next Next For $r = 1 To 5 Step 1 $Color_Chooser[$r] = TrayCreateItem($Color_Themes[$r - 1][0]) Next TrayCreateItem("") $beenden = TrayCreateItem("Beenden") $pluszeichen = GUICtrlCreateLabel("+", $size * 2, $size * 11, 20, 20, $SS_CENTER) $r = 1 For $w = 3 To 6 Step 1 $Char_Text_Remain[$r] = GUICtrlCreateLabel($r, $size * $w, $size * 11, 20, 20, $SS_CENTER) GUICtrlSetColor(-1, $Text_Color_Dark) $r += 1 Next Dim $Min[3] = [GUICtrlCreateLabel("M", $size * 8, $size * 11, 20, 20, $SS_CENTER), _ GUICtrlCreateLabel("i", $size * 9, $size * 11, 20, 20, $SS_CENTER), _ GUICtrlCreateLabel("n", $size * 10, $size * 11, 20, 20, $SS_CENTER)] For $i = 0 To 2 GUICtrlSetColor($Min[$i], $Text_Color_Dark) Next GUISetState(@SW_SHOW) _CalibrateTime() #EndRegion ### END Koda GUI section ### ; While 1 If $Hour_Min <> @HOUR & @MIN Then _CalibrateTime() $Hour_Min = @HOUR & @MIN EndIf $tMsg = TrayGetMsg() Switch $tMsg Case $GUI_EVENT_CLOSE Exit Case $Color_Chooser[1] _Change_Color(1) Case $Color_Chooser[2] _Change_Color(2) Case $Color_Chooser[3] _Change_Color(3) Case $Color_Chooser[4] _Change_Color(4) Case $Color_Chooser[5] _Change_Color(5) Case $beenden Exit EndSwitch If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit WEnd ; Func _CalibrateTime() $Get_Min = @MIN $Get_Hour = _Hour_Correct(@HOUR) For $g = 0 To 11 If _GetMinNumber($Get_Min) = $Text_Min_Highlight[$g][0] Then _Set_Remainder_Min(@MIN) $Text_Num_Split = StringSplit($Text_Min_Highlight[$g][1], "|") $Text_Hr_Split = StringSplit($Text_Hour_Highlight[$Get_Hour][1], "|") For $h = 1 To 110 GUICtrlSetColor($Char_Text[$h], $Text_Color_Dark) For $l = 1 To $Text_Num_Split[0] If $Text_Num_Split[$l] = $h Then GUICtrlSetColor($Char_Text[$Text_Num_Split[$l]], $Text_Color_Lit) EndIf Next For $m = 1 To $Text_Hr_Split[0] If $Text_Hr_Split[$m] = $h Then GUICtrlSetColor($Char_Text[$Text_Hr_Split[$m]], $Text_Color_Lit) EndIf Next Next Return EndIf Next EndFunc ;==>_CalibrateTime ; Func _Change_Color($colorNumb) GUISetBkColor($Color_Themes[$colorNumb - 1][1]) $Text_Color_Dark = $Color_Themes[$colorNumb - 1][2] _CalibrateTime() IniWrite(@TempDir & "/QLOCKTWOSettings.ini", "Theme", "Selected", $colorNumb - 1) EndFunc ;==>_Change_Color ; Func _GetMinNumber($s_Number) Switch $s_Number Case 0 To 4 Return "00" Case 5 To 9 Return "05" Case 10 To 14 Return "10" Case 15 To 19 Return "15" Case 20 To 24 Return "20" Case 25 To 29 Return "25" Case 30 To 34 Return "30" Case 35 To 39 Return "35" Case 40 To 44 Return "40" Case 45 To 49 Return "45" Case 50 To 54 Return "50" Case 55 To 59 Return "55" EndSwitch EndFunc ;==>_GetMinNumber ; Func _Hour_Correct($s_Hour) Switch $s_Hour Case 13 To 23 $Hour = ($s_Hour - 13) Case 00 $Hour = 11 Case Else $Hour = $s_Hour - 1 EndSwitch If @MIN > 19 Then $Hour += 1 If $Hour > 11 Then $Hour = 00 EndIf Return $Hour EndFunc ;==>_Hour_Correct ; Func _Set_Remainder_Min($q_Min) Local $e_Count $w_Min = StringRight($q_Min, 1) Switch $w_Min Case 1, 6 $e_Count = 1 Case 2, 7 $e_Count = 2 Case 3, 8 $e_Count = 3 Case 4, 9 $e_Count = 4 Case 0, 5 $e_Count = 0 EndSwitch For $t = 1 To 4 GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Dark) Next If $e_Count > 0 Then For $i = 0 To 2 Step 1 GUICtrlSetColor($Min[$i], $Text_Color_Lit) Next GUICtrlSetColor($pluszeichen, $Text_Color_Lit) For $t = 1 To $e_Count GUICtrlSetColor($Char_Text_Remain[$t], $Text_Color_Lit) Next EndIf If $e_Count = 0 Then For $i = 0 To 2 Step 1 GUICtrlSetColor($Min[$i], $Text_Color_Dark) Next GUICtrlSetColor($pluszeichen, $Text_Color_Dark) EndIf EndFunc ;==>_Set_Remainder_Min i also changed some little things, because they looked ugly in my eyes but, well, that's a matter of opinion I hope you like it . Btw you can change the color scheme now with TrayItems.
-
#include <Array.au3> $pr1list_array = StringSplit($pr1list, @LF, 2) $pr2list_array = StringSplit($pr2list, @LF, 2) $pr3list_array = StringSplit($pr3list, @LF, 2) Dim $prlist_array[3] = [StringSplit($pr1list, @LF, 2),StringSplit($pr2list, @LF, 2),StringSplit($pr3list, @LF, 2)] $fpr1 = 0 $fpr2 = 0 $fpr3 = 0 Dim $fpr[3] = [0,0,0] For $x = 1 To 3 For $w = 0 To UBound($urllist_array) - 1 If _ArraySearch($prlist_array[$x-1], $urllist_array[$w]) > -1 Then ; Syntax error in Array to search ;"$fpr" & $x += 1 ; Syntax Error $fpr[$x-1] += 1 EndIf Next Next as far as I know, it is not possible to sum up variable names so it would be better to put it in an array Hope this was, what you were looking for EDIT: now he just shows the error that some variables havn't been declarde, because you just gave us a piece of code