emoyasha Posted January 25, 2008 Share Posted January 25, 2008 (edited) hello everyone just so its stated this was originaly cobra messenger 0.0.3.6 i have changed it to emoyasha messenger 0.0.4.2 however the copyrights are all still in tact now thats over with a need help it appears that when more than one user signs up in a short period of time the script gets confused somewhere with the arrays.. i dunno exactly but it says incorrect number of scripts or subscripts. this starts on line 148 (user array structure). i tried re arranging how the array structure worked and yeah i didn't have any problems with multiple sign ups however everyones usernames where confused with one another and random names came up, no luck there. i beleive the problems is that when the script goes to access a part of the array its not there or that that when a new user is detected the array is only set to add one user each time and so when more than one new user is present it fails to add them all and crashes. any help would be appricitated expandcollapse popup; ---------------------------------------------------------------- ; -> All the code in this server is up to date. <- ; -> It is equally functional as the release version. <- ; -> <- ; -> Created by: Manadar <- ; ---------------------------------------------------------------- ; Includes ; -------- ;#NoTrayIcon #include <GUIConstants.au3> #include <Array.au3> #include <String.au3> ; Stringencrypt only. ; Server doesn't pause when tray is clicked. Pausing the server = bad idea. Opt("TrayAutoPause", 0) Opt("TrayOnEventMode", 1) ; Log in/out register requests ; ---------------------------- Global Const $AUTHORIZE = "AUT" Global Const $LOGOUT = "OUT" Global Const $REGISTER = "REG" Global Const $ACTIVATE = "ACT" ; Update request Global Const $DOWNLOAD = "DNL" ; Common requests ; --------------- Global Const $GETSTATE = "GST" Global Const $MESSAGE = "MSG" Global Const $CHANGENAME = "CHG" ; Contacts requests ; ----------------- Global Const $ADDUSER = "ADD" Global Const $DELUSER = "DEL" Global Const $GETLIST = "GET" ; Responses ; --------- Global Const $ACKNOWLEDGE = "ACK" Global Const $DENIAL = "DIE" Global Const $ERROR = "ERR" ; Options Dim $MaxConnections = 5 ; Variable declaration Dim $AppTitle = "Cobra Server" Dim $Ini = "Database.ini" Dim $GUI, $Edit Dim $CurrentClientVersion = IniRead($Ini,"GeneralConfig", "CurrentClientVersion", "v0.4.1") Dim $NewClientLocation = IniRead($Ini,"GeneralConfig", "NewClientLocation", "http://rsihq.us/update.exe") Dim $Socket[$MaxConnections] Dim $Index[$MaxConnections] Dim $Email[1] Dim $Password[1] Dim $DispName[1] Dim $NewSocket Dim $MainSocket ; Get users list ; -------------- If Not FileExists($Ini) Then ; First time the server initializes, ask the user to set a password. GUICreate($AppTitle, 248, 176, 193, 115) GUISetFont(10, 400, 0, "Verdana") GUICtrlCreateLabel("The server requires a administrator account to be set. Do this now or press Cancel to stop booting the server.", 5, 5, 236, 75) GUICtrlCreateLabel("Password", 5, 120, 66, 25) GUICtrlCreateLabel("Email", 5, 90, 68, 25) $User = GUICtrlCreateInput("Admin", 75, 90, 170, 24) $Pass = GUICtrlCreateInput("", 75, 120, 170, 24, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL)) $Create = GUICtrlCreateButton("Create", 90, 150, 75, 21, 0) $Cancel = GUICtrlCreateButton("Cancel", 170, 150, 75, 21, 0) GUISetState() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Cancel Exit Case $Create ExitLoop EndSwitch WEnd $Email[0] = GUICtrlRead($User) $Password[0] = _StringEncrypt(1,GUICtrlRead($Pass),$Email[0]) $DispName[0] = "Administrator" IniWrite($Ini,"GeneralConfig","AdminAccount",$Email[0]) IniWrite($Ini,$Email[0],"Password", $Password[0]) IniWrite($Ini,$Email[0],"DisplayName", "Administrator") IniWrite($Ini,$Email[0],"Activated", 1) GUIDelete() EndIf Opt("GUIOnEventMode", 1) TrayCreateItem("Debug User Information") TrayItemSetOnEvent(-1,"Debug") TrayCreateItem("") TrayCreateItem("Disconnect All") TrayItemSetOnEvent(-1,"DisconnectAll") TrayCreateItem("Display Users") TrayItemSetOnEvent(-1,"Info") TrayCreateItem("") TrayCreateItem("Global Message") TrayItemSetOnEvent(-1,"GlobalMessage") ;Users array structure documentation ;-------------------------- #cs $Email[n] = Email of each user $Password[n] = Password of each user $Contacts[n][Int] = Array of contacts of a user, example: $Contacts[0][0] = 2 $Contacts[0][1] = Manadar $Contacts[0][2] = Admin $Contacts[1][0] = 1 $Contacts[1][1] = Kim #ce ; Create user array structure ; --------------------------- Global $Email = IniReadSectionNames($Ini) _ArrayDelete($Email,0) _ArrayDelete($Email,0) For $x = 0 to UBound($Email)-1 If IniRead($Ini,$Email[$x],"Activated", 0) = 1 Then _ArrayAdd($Password, IniRead($Ini,$Email[$x],"Password", "??NoPassword??")) _ArrayAdd($DispName, IniRead($Ini,$Email[$x],"DisplayName", "??NoDisplayname??")) Else _ArrayDelete($Email,$x) EndIf Next _ArrayDelete($Password,0) _ArrayDelete($DispName,0) ; Initialize TCP ; -------------- TCPStartup() $MainSocket = TCPListen(@IPAddress1,----(not avalable)) If @error Then MsgBox(0, $AppTitle, "Fatal Error. Server unable to initliaze. Error no. " & @error) Exit EndIf TrayTip("Notification", $AppTitle & " running.", 2,1) ConsoleWrite($AppTitle & " running."&@CRLF) ; Main loop ; --------- While 1 ; Check for new connections ; ------------------------- $NewSocket = TCPAccept($MainSocket) If Not @error AND $NewSocket <> -1 Then $n = FindEmptySocket() If Not @error Then $Socket[$n] = $NewSocket $Index[$n] = -1 Else TCPCloseSocket($NewSocket) EndIf EndIf ; Check all existing connections ; ------------------------------ For $n = 0 to $MaxConnections-1 If $Socket[$n] <> "" Then $Data = TCPRecv($Socket[$n],1024) If @error Then ; User disconnected ; ----------------- $Socket[$n] = "" $Index[$n] = -1 Else If $Data <> "" Then ; Command received ; ---------------- If $Data Then $Command = StringLeft($Data,3) If $Index[$n] = -1 Then ; User not logged in, check for Log in/out register commands. ; ----------------------------------------------------------- Switch $Command Case $AUTHORIZE ; Parse the log in command ; ------------------------ $Split = StringSplit($Data," ") If $Split[0] = 4 Then ; Check wether the client is the right version. If $Split[4] <> $CurrentClientVersion Then TCPSend($Socket[$n],$DOWNLOAD & " " & $NewClientLocation & " " & $CurrentClientVersion) Else ; The user has the right version. This is the actual logging in procedure. ; Check if user is already logged in ; Loop through the users for a valid Email | password For $i = 0 to UBound($Email)-1 If $Split[2] = $Email[$i] AND $Split[3] == $Password[$i] Then ; The right password has been found. ;check if the user is already logged in. For $j = 0 to UBound($Index)-1 If $Index[$j] > -1 Then If $Email[$Index[$j]] = $Split[2] Then TCPSend($Socket[$j],"OUT") ExitLoop EndIf EndIf Next $Index[$n] = $i TCPSend($Socket[$n],$ACKNOWLEDGE) ExitLoop ElseIf $i = UBound($Email)-1 Then ; End of loop reached, check wether the user requires activation If IniRead($Ini,$Split[2],"ActivationCode","") <> "" Then ; the user does need to activate his account TCPSend($Socket[$n],$ACTIVATE) Else ; the user has entered the wrong credentials or hasn't registered at all TCPSend($Socket[$n],$DENIAL) EndIf EndIf Next EndIf Else TCPSend($Socket[$n],$ERROR) EndIf Case $REGISTER $Split = StringSplit($Data," ") If $Split[0] == 4 Then ;$Split[2] = email ;$Split[3] = password encrypted ;$Split[4] = version If $Split[4] <> $CurrentClientVersion Then ; Send a message that the user should download the new version. TCPSend($Socket[$n],"DNL " & $NewClientLocation & " " & $CurrentClientVersion) Else ; Client is up to date. For $i = 0 to UBound($Email)-1 If $Split[2] = $Email[$i] Then TCPSend($Socket[$n], $DENIAL) ExitLoop ElseIf $i = UBound($Email)-1 Then $CurrentActivationCode = "" For $j = 0 to 20 If Random(0,1,1) Then $CurrentActivationCode &= Chr(Random(48,57,1)) Else $CurrentActivationCode &= Chr(Random(65,90,1)) EndIf Next IniWrite($Ini,$Split[2],"ActivationCode", $CurrentActivationCode) IniWrite($Ini,$Split[2],"Password", $Split[3]) IniWrite($Ini,$Split[2],"DisplayName", $Split[2]) SendActivationEmail($Split[2],$CurrentActivationCode) TCPSend($Socket[$n],$ACKNOWLEDGE) EndIf Next EndIf Else TCPSend($Socket[$n],$ERROR) EndIf Case $ACTIVATE $Split = StringSplit($Data," ") If $Split[0] == 3 Then ; $Split[2] = email ; $Split[3] = activation code $Read = IniRead($Ini,$Split[2],"ActivationCode", "") If $Read AND $Read = $Split[3] Then ; Double check the user is not sending a empty string. IniWrite($Ini,$Split[2],"Activated",1) _ArrayAdd($Email,$Split[2]) _ArrayAdd($Password,IniRead($Ini,$Split[2],"Password","??NoPassword??")) _ArrayAdd($DispName,$Split[2]) IniDelete($Ini,$Split[2], "ActivationCode") TCPSend($Socket[$n],"ACK") Else TCPSend($Socket[$n],"DIE") EndIf Else TCPSend($Socket[$n],"ERR") EndIf Case Else TCPSend($Socket[$n],$ERROR) EndSwitch Else ; User logged in, check for common and user commands. ; --------------------------------------------------- Switch $Command Case $LOGOUT ; Clear the email from the logged in users. $Index[$n] = -1 TCPSend($Socket[$n],$ACKNOWLEDGE) Case $MESSAGE ; Parse the message command. ;--------------------------- $Split = StringSplit($Data," ") For $i = 0 to $MaxConnections-1 If ($Index[$i] > -1) AND $Email[$Index[$i]] = $Split[2] Then ; User is logged in, send the message and a acknowledge to the sender. TCPSend($Socket[$i],StringReplace($Data,$Email[$Index[$i]],$Email[$Index[$n]],1)) TCPSend($Socket[$n],$ACKNOWLEDGE) ExitLoop ElseIf $i = $MaxConnections-1 Then ; User is not logged in. TCPSend($Socket[$n],$DENIAL) EndIf Next Case $GETSTATE ; Parse the command that gets the state and displayname of a user. ; ------------------------------------------------ $Split = StringSplit($Data," ") If $Split[0] = 2 Then For $i = 0 to $MaxConnections-1 If ($Index[$i] > -1) AND $Email[$Index[$i]] = $Split[2] Then ; User is online. TCPSend($Socket[$n],$ACKNOWLEDGE & " " & $DispName[$Index[$i]]) ExitLoop ElseIf $i = $MaxConnections-1 Then ; User is offline. TCPSend($Socket[$n],$DENIAL & " " & $DispName[$Index[$i]]) EndIf Next Else TCPSend($Socket[$n],$ERROR) EndIf ; User Commands ; ----------------------- Case $ADDUSER $Split = StringSplit($Data," ") If $Split[0] = 2 Then $Split = StringSplit($Data," ") $read = StringStripWS(IniRead($ini,$Email[$Index[$n]],"Contacts",""),7) If StringInStr($read,$Split[2]) Then TCPSend($Socket[$n],$DENIAL) Else For $i = 0 to UBound($Email)-1 If $Email[$i] = $Split[2] Then IniWrite($Ini,$Email[$Index[$n]],"Contacts", StringStripWS($read & " " & $Split[2],7)) TCPSend($Socket[$n],$ACKNOWLEDGE) ElseIf $i = UBound($Email)-1 Then ; User is not logged in. TCPSend($Socket[$n],$DENIAL) EndIf Next EndIf Else TCPSend($Socket[$n],$ERROR) EndIf Case $DELUSER $Split = StringSplit($Data," ") If $Split[0] = 2 Then $read = StringStripWS(IniRead($ini,$Email[$Index[$n]],"Contacts",""),7) $read = StringStripWS(StringReplace($read,$Split[2],""),7) IniWrite($Ini,$Email[$Index[$n]],"Contacts", $read) TCPSend($Socket[$n],$ACKNOWLEDGE) Else TCPSend($Socket[$n],$ERROR) EndIf Case $GETLIST $read = StringStripWS(IniRead($ini,$Email[$Index[$n]],"Contacts",""),7) TCPSend($Socket[$n],$GETLIST & " " & $read) Case $CHANGENAME $Split = StringSplit($Data," ") If $Split[0] = 2 Then $DispName[$Index[$n]] = $Split[2] TCPSend($Socket[$n],$ACKNOWLEDGE) Else TCPSend($Socket[$n],$ERROR) EndIf Case Else TCPSend($Socket[$n],$ERROR) EndSwitch EndIf EndIf EndIf EndIf EndIf Next Sleep(5) WEnd ; Functions ; --------- Func OnAutoItExit() TCPShutdown() EndFunc Func SendActivationEmail($e_Recipient, $e_Activation) FileWrite( $e_Recipient & ".txt" ,$e_Activation ) EndFunc ;==>SendEmail Func SocketToIP($SHOCKET) Local $sockaddr = DLLStructCreate("short;ushort;uint;char[8]") Local $aRet = DLLCall("Ws2_32.dll","int","getpeername","int",$SHOCKET, "ptr",DLLStructGetPtr($sockaddr),"int_ptr",DLLStructGetSize($sockaddr)) If Not @error And $aRet[0] = 0 Then $aRet = DLLCall("Ws2_32.dll","str","inet_ntoa","int",DLLStructGetData($sockaddr,3)) If Not @error Then $aRet = $aRet[0] Else $aRet = 0 EndIf $sockaddr = 0 Return $aRet EndFunc Func FindEmptySocket() For $n = 0 to $MaxConnections-1 If $Socket[$n] = "" Then Return $n EndIf Next SetError(1) EndFunc ; Tray functions Func DisconnectAll() For $n = 0 to $MaxConnections-1 If $Socket[$n] <> "" Then TCPCloseSocket($Socket[$n]) $Socket[$n] = "" $Index[$n] = -1 EndIf Next EndFunc Func GlobalMessage() If $GUI = "" Then $GUI = GUICreate("Global Message", 471, 121, 193, 115) $Edit = GUICtrlCreateEdit("", 2, 2, 465, 89, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlCreateButton("Ok", 280, 95, 110, 22, 0) GUICtrlSetOnEvent(-1,"SendGlobal") GUICtrlCreateButton("Cancel", 395, 95, 75, 22, 0) GUICtrlSetOnEvent(-1,"CloseGlobal") EndIf GUISetState(@SW_SHOW) EndFunc Func CloseGlobal() If $GUI <> "" Then GUIDelete($GUI) $GUI = "" EndIf EndFunc Func SendGlobal() If $GUI <> "" Then $Text = GUICtrlRead($Edit) For $n = 0 to $MaxConnections-1 If $Socket[$n] <> "" AND ($Index > -1) Then TCPSend($Socket[$n],"MSG" & $Email[$Index[$n]] & " Server " & $Text) EndIf Next CloseGlobal() EndIf EndFunc Func Info() ; Display a tooltip with information about the current connections ; ---------------------------------------------------------------- Local $temp For $n = 0 to $MaxConnections-1 If ($Socket[$n] <> "" AND $Index[$n] > 1) OR ($Index[$n] > -1) Then $temp &= $Socket[$n] & ":" & @TAB & $Email[$Index[$n]] & @CRLF EndIf Next If $temp = "" Then $temp = "No clients online." EndIf TrayTip($AppTitle,$temp,10) EndFunc Func Debug() _ArrayDisplay($Email,"$Email - Debug") _ArrayDisplay($Password,"$Password - Debug") _ArrayDisplay($DispName,"$Dispname - Debug") EndFunc Edited March 21, 2018 by Melba23 User name removed by request Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
Achilles Posted January 25, 2008 Share Posted January 25, 2008 I don't quite understand what you're asking but here are some things to know about arrays that might help: The function UBound($array) gets the size of the array... Before trying to get a piece of info from an array try checking the index value by using the UBound command ReDim is used to change the size of an array while still keeping the information you have in the original array I'm guessing your problem is with my second point... Just use something like this: If $index < UBound($array) then;If the index is within the correct range for the array $blah = $array[$index];Assign a variable to the array value (or whatever you want) EndIf My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 here is where the error is ;Users array structure documentation ;-------------------------- #cs $Email[n] = Email of each user $Password[n] = Password of each user $Contacts[n][Int] = Array of contacts of a user, example: $Contacts[0][0] = 2 $Contacts[0][1] = Manadar $Contacts[0][2] = Admin $Contacts[1][0] = 1 $Contacts[1][1] = Kim #ce ; Create user array structure ; --------------------------- Global $Email = IniReadSectionNames($Ini) _ArrayDelete($Email,0) _ArrayDelete($Email,0) For $x = 0 to UBound($Email)-1 If IniRead($Ini,$Email[$x],"Activated", 0) = 1 Then _ArrayAdd($Password, IniRead($Ini,$Email[$x],"Password", "??NoPassword??")) _ArrayAdd($DispName, IniRead($Ini,$Email[$x],"DisplayName", "??NoDisplayname??")) Else _ArrayDelete($Email,$x) EndIf Next _ArrayDelete($Password,0) _ArrayDelete($DispName,0) it seems when many users sign up at once something goes wrong, and says it has an incorrect number of scripts or subscripts and crashes Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 so im guesing is two users both register before this happens.... then the script wont handle both and once and crashed, any way to fix that? Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 I'm thinking when it deletes an email, that you need to redeclare something or rather. Like this? Global $Email = IniReadSectionNames($Ini) _ArrayDelete($Email,0) _ArrayDelete($Email,0) $x = 0 While 1 If $x = UBound($Email) - 1 Then ExitLoop If IniRead($Ini,$Email[$x],"Activated", 0) = 1 Then _ArrayAdd($Password, IniRead($Ini,$Email[$x],"Password", "??NoPassword??")) _ArrayAdd($DispName, IniRead($Ini,$Email[$x],"DisplayName", "??NoDisplayname??")) Else _ArrayDelete($Email,$x) EndIf $x += 1 WEnd _ArrayDelete($Password,0) _ArrayDelete($DispName,0) Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 lemme try that out... Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 yes thank you it worked like a charm... so far lol. also quick question if i want to make a window go to the front of all other windows like go on top what do i do, i tryed winactivate with no luck Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 Set the style of it. $hwnd = Handle to the window. GUISetStyle ($DS_SETFOREGROUND, -1, $hwnd) Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 if the handle just the name or the actual code for the gui like guicreate? Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 if the handle just the name or the actual code for the gui like guicreate?And handle can be returned from WinGetHandle () or GUICreate. You should only use the GUI functions with AutoIt created GUIs... For another window use:#Include <WinAPI.au3>_WinAPI_SetWindowLong($hWnd, $iIndex, $iValue) Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 so like, $hwnd = wingethandle( $apptitle ) GUISetStyle ($DS_SETFOREGROUND, -1, $hwnd) Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 so like, $hwnd = wingethandle( $apptitle )GUISetStyle ($DS_SETFOREGROUND, -1, $hwnd)Thats what I said right? Or if $apptitle = GUICreate () then GUISetStyle ($DS_SETFOREGROUND, -1, $apptitle) Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 i see i see . thanks for your help, im starting to get the hang of this and i lik eit a lot better than autohotkey. mean autohotkey is good when it comes to simplicity, but not nearly as much funtionality as autoit Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 1 tip... RTFM and search before you post Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 i see what i was doing wrong, the name of the window i want is $ChildWindow[$r] lol not $apptitle Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 lol an di do read it, its just sometimes i need it explained to me so i understand, or i dunno here to look, because im used to AHK u cant put if %var% = /nudge lol it didnt work that way si i didnt know if thats how it worked here and other things like that.... Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 lol an di do read it, its just sometimes i need it explained to me so i understand, or i dunno here to look, because im used to AHK u cant put if %var% = /nudge lol it didnt work that way si i didnt know if thats how it worked here and other things like that....AHK was based on an earlier verison of AutoIt. Funny how the word stole came to mind... They stole it when AutoIt was still Open source. If memory serves me correct, the very reason why AutoIt is closed source. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 its funny how you can steal functions from an open source project, isnt it? i dont want to argue but ahk took a few functions from autoit, autohotkey didnt steal the source because source cant be stolen if its open source for one and for two not even half of the functions of autohotkey are from autoit. Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
BrettF Posted January 25, 2008 Share Posted January 25, 2008 its funny how you can steal functions from an open source project, isnt it?i dont want to argue but ahk took a few functions from autoit, autohotkey didnt steal the source because source cant be stolen if its open source for one and for two not even half of the functions of autohotkey are from autoit.You can, and they did. Pretty much what you did with Manadars code. You have never ever looked into what happened with AutoIt and AHK. If you don't know the full facts, then just go back to it. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
emoyasha Posted January 25, 2008 Author Share Posted January 25, 2008 i know what i have heard, and ive heard that ahk borrowed functions from autoit because it was open source and i do beleive that those functions are backwards compatable in ahk so then really nothing was stolen. and i didnt steal code how do i steal code to learn off of as long as i follow the copyright notice myabe in the eyes of someonoe its was stolen but leagaly bu the copyrights its not, and if he didnt want it developed in the way im changing it then he should have made the copyright different. beside u cant steal a code if u follow the copyright.... Spoiler Admin Of:http://notmyspace.info [Under Development, looking for volunteers to help improve]http://PSNetCards.co.ukhttp://ZacnAndLindsey.com [Under development, not quite sure what to do with it yet]http://revelm.com------------------------------------Radio Streams:http://75.185.53.88:8000 [128kb/s 44kHz]http://75.185.53.88:8002 [22kb/s 22kHz](works on mobile phones)-----------------------------------My Server:Owned By: http://jumpline.comIP:66.84.19.220Bandwidth:200GBStorage Space:1TBNetwork Connection: 1GB/S[up and down]Operating System: Red Hat LinuxInstalled Apps:Webmail, phpBB, Majordomo, phpMyAdmin, MySQL, Active Server Pages, FrontPage Extensions 2002, GraphicsMagick, Mod Perl, Perl, PHP: Hypertext Preprocessor, Python(want cheap good webhosting, or need a place to park your domain? contact me)----------------------------------- Â Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now