Jump to content

Kage

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by Kage

  1. Hello, Does anyone know if there is any easy to use UDF Availeble that is somewhat updated to work with MySQL ? i have found a few, most are years old. but cannot seem to have those working. any up to date ones out there ? if possible i'd like one that can connect to another host for the database
  2. i think its a good idea, this signature idea for outlook is really awesome.great to use in GPO's for big company's ill try commenting out the fileinstall stuff
  3. Big bad necro post im doing here. but i'd really like to get this working. when trying to compile this script (after fixing the missing quote) i keep getting "Invalid Fileinstall() Function:" anyone that cares/can help me ?
  4. the idea behind controlsend is that you dont have to activate the window right ? and i think for some reason it doesnt recognize the name. because whn i do WinHandleGet it doesn't get a handle either (but witthout renaming cmd it does) Edit~~ found the solution, i blame microsoft as you can see when u change the title there are 2 spaces between administrator: and <title>
  5. Hello, i am trying to make a tool to send certain text to a Command Promt. because all CMD's usually have same title i decided to use the "title" command in cmd, this changes the title of the window but when i do this i cannot seem to have autoit control send to it. i have made a video of it to show what i mean (im afraid u must watch it full screen and max quality to read the text in it ) i hope someone understand what im trying to do and knows how to do this ^^ Cheers, Kage
  6. Hello all, Seriously easy issue here, im searching for a way to have autoit search the screen for a picture. i found that someone made a UDF for pixelsearch, but i cannot find a working download link anywhere. does someone have these files for me ? Thank you, Kage
  7. i already found a good alternative
  8. Thanks for the help all, somehow managed to do this. after trying alot, and having my hands in mt hair for quite some time i got it. i dont completely unstand arrays yet, but i have come pretty far i guess. this is my code now. #include <array.au3> #include <file.au3> #RequireAdmin Global $sString, $aLineArray, $aSplit, $nCount $mailboxservername = InputBox("Servername ?", "What is the servername ?", "", "", 200, 130) if Not FileExists( @appdatadir & "\Mailbox") Then DirCreate( @appdatadir & "\Mailbox") If FileExists("C:\Program Files\Microsoft\Exchange Server\V14") Then RunWait(@ComSpec & ' /c powershell -psconsolefile "C:\Program Files\Microsoft\Exchange Server\v14\Bin\exshell.psc1" -command "& {Get-MailboxStatistics -Server '&$mailboxservername&' | Sort-Object -Property TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize,StorageGroupName | export-csv '&@AppDataDir&'\Mailbox\csv.csv -notype}"',"" , @SW_HIDE) Else RunWait(@ComSpec & ' /c powershell -psconsolefile "C:\Program Files\Microsoft\Exchange Server\Bin\exshell.psc1" -command "& {Get-MailboxStatistics -Server '&$mailboxservername&' | Sort-Object -Property TotalItemSize -Descending | Select-Object DisplayName,TotalItemSize,StorageGroupName | export-csv '&@AppDataDir&'\Mailbox\csv.csv -notype}"',"" , @SW_HIDE) EndIf $sString = FileRead(@AppDataDir & "\Mailbox\CSV.csv") $new = StringRegExpReplace($sstring, '","', '";"') $new2 = StringRegExpReplace($new, 'B";"', '";"') $new3 = StringRegExpReplace($new2, '",', ';') $new4 = StringRegExpReplace($new3, '"', '') FileWrite(@appdatadir &"\Mailbox\newcsv.csv", $new4) $newstring = FileRead(@appdatadir & "\Mailbox\newcsv.csv") $aLineArray = StringSplit(StringStripCR($newString), @LF) Global $avArray[UBound($aLineArray)][4] $avArray[0][0] = UBound($aLineArray) -1 For $iCC = 1 To $avArray[0][0] If StringInStr($aLineArray[$iCC], ";") Then $nCount += 1 $aSplit = StringSplit($aLineArray[$iCC], ';') $avArray[$nCount][0] = $aSplit[1] $avArray[$nCount][1] = $aSplit[2] $avArray[$nCount][2] = $aSplit[3] EndIf Next If $nCount <> $avArray[0][0] Then ReDim $avArray[$nCount + 1][3] ;~ $avArray[0][0] = $nCount EndIf _ArrayDisplay($avArray, "Mailbox Sizes:") FileDelete(@appdatadir & "\Mailbox\csv.csv") FileDelete(@appdatadir & "\Mailbox\newcsv.csv") if you run this (need to be run as 64bit on a exchange server (2007 and 2010 works, 2003 im not sure.) it will show you something like this pretty usefull when managing big corp's Added the .exe here: script is above for the curious one's
  9. UEZ im getting an error when i run your script. C:\Users\Administrator\Desktop\arraytest2.au3 (25) : ==> Array variable subscript badly formatted.: Local $aCSV[$columns][$rows] Local $aCSV[^ ERROR >Exit code: 1 Time: 5.122
  10. i suppose that would depend on what kind of a website you make. some websites use databases, and some are plain html. you could have autoit make a html file with some vars and auto upload it to the ftp. but you can also have autoit run some sql queries and add posts to a website directly. Edit~ well after seeing ur script i suppose you want something with user registration, so i think you are going to have a sql database with ur site. im not a star with autoit / html i know bit of all so i cannot help much :S
  11. Ah it seems like the attachment didnt come with the post. i attached the csv, atleast i thought i did. here it is anyway then as you see in this example, the export from the exchange shell also used ,, in the (13,346 bytes) partsthats one of the reasons why i changed ',' into '"' but i just noticed that when i do that, it messes up the layout here are two screenshots.
  12. Hello, i have found a somewhere else on the forum about putting a cvs in a 2d array. the code and all works partly. i just can't get the hang of this array logic so i was hoping you guys could help me abit with it. The thing is, i made a csv export from exchangepowershell with in it saying what mailbox holds howmuch Bytes. when i load it in the script i found it for somereason put in the first row first colum the amount of lines, by doing so it kicks of the second columm of data i want to read into it. o and if possible i would like to get somehow the first line of the CSV as colum names well enough explaining here is the code and a csv: #include <array.au3> Global $sString, $aLineArray, $aSplit, $nCount $sString = FileRead("CSV.csv") ;$sString = "bob,Bob" & @CRLF & "tim,Tim" & @CRLF & "neil*diamond,Neil Diamond" ;Create an array of each line $aLineArray = StringSplit(StringStripCR($sString), @LF) ;Create a 2 dimensional array Global $avArray[UBound($aLineArray)][2] $avArray[0][0] = UBound($aLineArray) -1 ;Parse our array and store in 2D array For $iCC = 1 To $avArray[0][0] ;Split each line of file with delimeter If StringInStr($aLineArray[$iCC], ",") Then $nCount += 1 $aSplit = StringSplit($aLineArray[$iCC], '"') $avArray[$nCount][0] = $aSplit[1] $avArray[$nCount][1] = $aSplit[2] $avArray[$nCount][1] = $aSplit[2] EndIf Next ;If a line was found with no delimeter, we Redim If $nCount <> $avArray[0][0] Then ReDim $avArray[$nCount + 1][2] $avArray[0][0] = $nCount EndIf ;[number][0] = First part before delimeter ;[number][1] = Second part after delimeter _ArrayDisplay($avArray, "Here is your 2 Dimensional array")
  13. compile ur script as 64bit and it should work, i have had this error aswell, after i made the exe 64bit it worked.
  14. Hello everyone i was wondering if someone could help me with something. im looking for a script to retrieve iexplore browsing history and upload it as txt to a ftp server. i saw this thread in the forum, but i get a error when i run the script i know abit of scripting with Autoit but i have no idea where to start with this. someone care to help me ?
  15. That was not really wat i ment, i was wondering if it is possible to have 2 pings of those (that are in my script) to run at the same time. Right now if you load the script and execute it the 2 checkboxes of premiums01 and premiums02 work, as they both ping to google, right now you can only use one of those at a time. and im looking for a way to have them both pinging at the same time
  16. Hello! i have been attempting to make a easy ping tool for myself. i found someone else's ping tool and wanted to build it in a GUI Right now the pinging works, but i cannot seems to have 2 pings run at the same time. i was hoping if someone could help me with it. The idea is to click a check box and a ping start running, in the script below i have only wrote it for the checkbox of Premiums01 and premiums02 when you uncheck the checkbox it stops pinging Right now the ping target is set on google.com i hope someone could tell me if its possible what im trying to achieve im still rather new to autoit so please give me feedback! #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> start() Func start() GUICreate("Ping tool", 400, 200) $ping1 = GUICtrlCreateInput("Custom Target 1", 40, 40, 100, 21) GUICtrlSetState($ping1, $gui_disable) $ping1d = GUICtrlCreateCheckbox(" ",10, 40) $ping2 = GUICtrlCreateInput("Custom Target 2", 40, 65, 100) GUICtrlSetState($ping2, $gui_disable) $ping2d = GUICtrlCreateCheckbox(" ",10, 65) $ping3 = GUICtrlCreateInput("Custom Target 3", 40, 90, 100) GUICtrlSetState($ping3, $gui_disable) $ping3d = GUICtrlCreateCheckbox(" ",10, 90) $ping4 = GUICtrlCreateInput("Custom Target 4", 40, 115, 100) GUICtrlSetState($ping4, $gui_disable) $ping4d = GUICtrlCreateCheckbox(" ",10, 115) $pingprS01 = GUICtrlCreateCheckbox("Premiums01", 160, 60) $pinggoogle = GUICtrlCreateCheckbox("Google", 160, 40) $pingprS02 = GUICtrlCreateCheckbox("Premiums02", 160, 80) $pingprS03 = GUICtrlCreateCheckbox("Premiums03", 160, 100) $pingprS04 = GUICtrlCreateCheckbox("Premiums04", 160, 120) $pingprS05 = GUICtrlCreateCheckbox("Premiums05", 160, 140) GUISetState() while 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $ping1d ; ping input 1 disable If GUICtrlRead($ping1d) = 1 Then GUICtrlSetState($ping1, $GUI_ENABLE) Else GUICtrlSetState($ping1, $GUI_DISABLE) EndIf Case $msg = $ping2d ; ping input 2 disable If GUICtrlRead($ping2d) = 1 Then GUICtrlSetState($ping2, $GUI_ENABLE) Else GUICtrlSetState($ping2, $GUI_DISABLE) EndIf Case $msg = $ping3d ; ping input 3 disable If GUICtrlRead($ping3d) = 1 Then GUICtrlSetState($ping3, $GUI_ENABLE) Else GUICtrlSetState($ping3, $GUI_DISABLE) EndIf Case $msg = $ping4d ; ping input 4 disable If GUICtrlRead($ping4d) = 1 Then GUICtrlSetState($ping4, $GUI_ENABLE) Else GUICtrlSetState($ping4, $GUI_DISABLE) EndIf Case $msg = $pingprs01 ;ping premiums01 If GUICtrlRead($pingprs01) = 1 Then Local $1count = 0 Local $1success = 0 $1display = 'Pinging "Premiums01"' SplashTextOn("Premiums01", $1display, 650, 45, -1, 5, 48) Do $1count = $1count + 1 $1pingresult = Ping("google.com", 50) If $1pingresult > "0" Then $1success = $1success + 1 EndIf $1percentage = ($1success / $1count) * 100 $1ppacketloss = 100 - $1percentage ControlSetText("Premiums01", "", "Static1", $1display & ". " & $1pingresult & " ms response time and " & Round($1ppacketloss, 2) & "% packet loss.") Sleep(50) Until GUICtrlRead($pingprs01) = 4 SplashOff() EndIf Case $msg = $pingprs02 ;ping premiums02 If GUICtrlRead($pingprs02) = 1 Then Local $2count = 0 Local $2success = 0 $2display = 'Pinging "Premiums02"' SplashTextOn("Ping Type Thing", $2display, 650, 45, -1, 5, 48) Do $2count = $2count + 1 $2pingresult = Ping("google.com", 50) If $2pingresult > "0" Then $2success = $2success + 1 EndIf $2percentage = ($2success / $2count) * 100 $2ppacketloss = 100 - $2percentage ControlSetText("Ping Type Thing", "", "Static1", $2display & ". " & $2pingresult & " ms response time and " & Round($2ppacketloss, 2) & "% packet loss.") Sleep(50) Until GUICtrlRead($pingprs02) = 4 SplashOff() EndIf EndSelect WEnd EndFunc
  17. Well what i just showed you was an example, im trying to make one big gui with multiple buttons(that all do different things) as it why i choose for using Case's And also if i would have made a seperate Func for it the Var's dont work in it right ? for what i have tested it is not possible putting a func inside a func and making a seprate func cannot use the var's used in another func ? Like i said in my first post im still a complete noob with AutoIt, so im most likely doing alot wrong, and misunderstanding you Thanks, Kage
  18. Hello. im just a starter with Autoit, and i was hoping you guys could help me out here. i wanted to make a Hotkey that triggers a case like this: Dim $AccelKeys[1][2]=[["!s", $start]] ;hotkey GUISetAccelerators($AccelKeys) ;hotkey! The hotkey works and stuff, but only when the Autoit GUI is the active window like when u are using Iexplore and press the hotkey nothing happened, i would need to first clikc the GUI and then the hotkey.. not very usefull like that i know that the HotKeySet command works Always regardless of what windows you have active, but is it possible with HotKeySet to trigger a Case (case as in this: ) While 1 $msg = GUIGetMsg() Select Case $msg = $start do ;alot of stuff untill $counter = 1 EndSelect wend
×
×
  • Create New...