Jump to content

Search the Community

Showing results for tags 'with'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office


  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Member Title




Found 5 results

  1. can we create a list box with Columns? welcome everybody Dears I have a question if you let me can we create a list box with Columns? i know we can create a list view with Columns but my question is about the list box I'm waiting your responses Thank you in advance
  2. The Code #cs Name _DefaultAnalyser() Syntax: _DefaultAnalyser($sDefault,ByRef $sParameter) Parameters: $sVariable(ByRef) :The Variable to Check/Compare $sDefault :Pass the Default Value of the Varialble which has to be set When Default Keyword or -1 is used Return Values: This Function Doesn't Return Anything Remarks: This Function Checks the Value of a Variable and Sets it to the Optional Value Whenever Default(keyword) or -1 is Detected....... Example: Check The Bottom Of The The Script Author: Phoenix XL #ce Func _DefaultAnalyser(ByRef $sVariable,$sDefault) Switch $sVariable Case Default,-1 $sVariable=$sDefault EndSwitch EndFunc #Cs - Example - Just Remove The #Cs and #Ce Func _Msgbox($sFlag,$sTitle='Hello',$sText='Testing......Successful') _DefaultAnalyser($sText,'Testing......Successful') _DefaultAnalyser($sFlag,64) _DefaultAnalyser($sTitle,'Hello') Return MsgBox($sFlag,$sTitle,$sText) EndFunc _Msgbox(Default,Default,-1) _Msgbox(-1,-1,Default) _Msgbox(-1,Default,Default) _Msgbox(Default,-1,-1) #Ce
  3. For the past days i've been working on a program to make bingo cards, but now i've have a problem. The problem is that i only want 5 numbers on each row and they sould be spred randomly. To see the final result just open up Index.html after you've run the code. Look at the comments in the code for more info. Global $DBFile = @ScriptDir&"\Cards.txt" Global $NumToGenerate = 250 Global $Rnd[3] Global $NumPrVRow = "" Global $FillSpace[27] Global $Row[3] Global $Output Global $Mats[$NumToGenerate] Global $NumbersOnRow[3] ;Create Database File With Mats For $i = 1 To $NumToGenerate ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $i = ' & $i & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $a = "" For $i2 = 0 To 26 $FillSpace[$i2] = 0 Next $i2 = "" $i3 = "" $i4 = "" $NumPrVRow = "" For $i2 = 0 To 2 While 1 $Rnd[$i2] = Random(1,9,1) $Continue = True For $i3 = 0 To $i2 If ($Rnd[$i2] = $Rnd[$i3]) And ($i2 <> $i3) Then $Continue = False Next If $Continue = True Then ExitLoop WEnd Next For $i2=1 To 9 $a = 2 For $i3 = 0 To 2 If $Rnd[$i3] = $i2 Then $a = 1 Next $NumPrVRow &= $a Next For $i2 = 0 To 2 $NumbersOnRow[$i2] = 0 Next For $i2 = 1 To 9 $OldRnd2 = "" For $i3 = 1 To StringMid($NumPrVRow, $i2,1) While 1 $Rnd2 = Random(1,3,1) ;I tryed to add this line. $NumbersOnRow[$Rnd2-1] += 1 $Continue = True For $i4 = 0 To $i2 ;And change This ;If $Rnd2 = $OldRnd2 Then $Continue = False ;To If ($Rnd2 = $OldRnd2) Or ($NumbersOnRow[$Rnd2-1] > 5) Then $Continue = False Next $OldRnd2 = $Rnd2 If $Continue = True Then ExitLoop ;And Then Also Add This Line: $NumbersOnRow[$Rnd2-1] -= 1 ;But i still could'nt get it to work. WEnd $FillSpace[$Rnd2*9-9+$i2-1] = 1 Next Next $Full = "" For $i2 = 0 To 2 $Row[$i2] = "" For $i3 = 1 To 9 If $FillSpace[($i2+1)*9-9+$i3-1] = 1 Then If $i3 = 1 Then $Row[$i2] &= Random(1,9,1)&";" Else $Rnd3 = Random($i3&0,$i3&9,1) $Row[$i2] &= $Rnd3-10&";" EndIf Else $Row[$i2] &= ";" EndIf Next IniWrite($DBFile, $i, $i2+1, StringTrimRight($Row[$i2],1)) $Full &= $Row[$i2] Next IniWrite($DBFile, $i, "f", $Full) Next $Start = '<html>'&@CRLF&'<head>'&@CRLF&'<style type=text/css>'&@CRLF&' body { font-family: Verdana, Arial, Helvetica;}'&@CRLF&' tr { text-align: center; }'&@CRLF&' .c { padding-top: 35px; padding-bottom: 5px;'&@CRLF&' border-bottom: 2px dashed black; }'&@CRLF&' .s { padding-top: 5px; padding-bottom: 35px; }'&@CRLF&' .c, .s { font-size: 8px;}'&@CRLF&' .pb { page-break-before: always; }'&@CRLF&' .rn { font-family: Verdana, Arial, Helvetica; font-size: 13px; border: 2px solid black;}'&@CRLF&' .pn { font-family: Verdana, Arial, Helvetica; font-size: 18px; text-align: center;}'&@CRLF&'</style>'&@CRLF&'</head>'&@CRLF&'<body onLoad="print();">'&@CRLF&@CRLF&@CRLF $End = @CRLF&'</body></html>'&@CRLF $PageBreak = 1 For $i = 0 To $NumToGenerate-1 ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $i = ' & $i & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console $Mats[$i] = '<div class=pn>Pladenummer: '&$i+1&'F</div>'&@CRLF&'<table width=90% border=1 cols=10 align=center cellspacing=0'&@CRLF&'style="border-collapse: collapse" cellpadding=10> <tr>' For $i2 = 1 To 3 ;Change To ABC $Mats[$i] &= '<tr>'&@CRLF $Split = StringSplit(IniRead($DBFile, $i+1, $i2, ""),";") For $i3 = 1 To 9 $Mats[$i] &= '<td>'&$Split[$i3]&'</td>'&@CRLF Next $Mats[$i] &= '<td class=rn>'&ConvertToABCAndAddDots($i+1&$i2)&'</td>'&@CRLF $Mats[$i] &= '</tr>'&@CRLF Next $Mats[$i] &= '</table><div class=c>Made using The Bingo Program by Jacob Bom Andersen</div></br>'&@CRLF If $PageBreak = 4 Then $Mats[$i] &= '<div class=pb></div>' $PageBreak += 1 Next $Output = $Start For $i = 0 To $NumToGenerate-1 $Output &= $Mats[$i] Next $Output &= $End FileDelete("Index.html") FileWrite("Index.html", $Output) Func ConvertToABCAndAddDots($ToConvert) $Split2 = StringSplit($ToConvert, "") $Out = "" For $b = 1 To $Split2[0] If $b = $Split2[0] Then $Out &= Chr($Split2[$b]+64) Else $Out &= $Split2[$b]&Chr(183) EndIf Next Return $Out EndFunc Ps. The Database File that it is also makeing is for an other program that i've made to play bingo, witch is then also able to check is someone has bingo. Sorry for my bad english.
  4. hi agian , i need to make True progressbar.. you'll say "True?? How?" xD i'll tell you. in this script: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Crypt.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 385, 125, -1, -1) $Progress1 = GUICtrlCreateProgress(32, 32, 294, 17) $Label1 = GUICtrlCreateLabel("0", 336, 33, 10, 17) $Button1 = GUICtrlCreateButton("Button1", 160, 80, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $source = @ScriptDir & "dd.exe" $save = @ScriptDir &"dd" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 _Crypt_EncryptFile($source, $save, "123", $CALG_AES_256) EndSwitch WEnd Suppose the file size is "5 MB" so it will take time to encrypt it i need to make the progressbar loading with encrypting and finish with it too, not like this prog' for $i = to 100 sleep(10) guictrlsetdata($progress, $i) this progress above is not true.. i think now my problem explained all helps appreciated.. thanks.
  5. Hey guys, I just came across this thread; Where the poster asked how to run an internal function with admin rights. As far as I am aware, there has never been a script example of this. As is debated for the next 10 or so posts, this is not actually running the function with admin rights, it re-runs the file with admin credentials, runs the function with the parameter "a" (This can be changed) and then runs the function, which checks that the user is admin. What happens if they are admin, and what happens if they are not admin can, ofcourse, be changed. So I'll cut the chit-chat, here is the example: For $Repeat = 1 To $CmdLine[0];The $cmdline array is automatically set by autoit. It contains any parameters given to the program when it is run. ;Hold Shift and press F8 in scite to set parameters. Enter "a" into the first box, without quotes. MsgBox(0,"",$CmdLine[$Repeat]) ;For debug reasons - shows you what the current parameter is. If $CmdLine[$Repeat] = "a" Then ;Checks to see that the current parameter is "a" _AdminFunction() EndIf Next If @Compiled = 1 Then RunAs(InputBox("Username", "Insert the username of the administrator", "Administrator"), "", InputBox("Password", "Insert the password of the admin account.", ""), 0, FileGetShortName(@ScriptFullPath) & " a");Runs the compiled script with the a parameter Else RunAs(InputBox("Username", "Insert the username of the administrator", "Administrator"), "", InputBox("Password", "Insert the password of the admin account.", ""), 0, FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)& " a");Runs the uncompiled script with the a parameter EndIf Func _AdminFunction() If IsAdmin() Then;Ensures that the current user is admin as a normal user could run the program with the parameter set (if they have access to the code or try the parameter by pure chance to see what it does) MsgBox(0,"","Running Function as Admin") ;You can place your required script here. Else MsgBox(0,"","Running Function as Normal User. Function will not attempt") ;Function is not run be an administrator and so it will exit. EndIf Exit EndFuncI have tried this from a guest account on my computer (with and without credentials) and it has worked perfectly. I also tried running it as both compiled, and uncompiled, and again, it worked exactly as expected. It might not be something that people will use all the time, but it's here for anybody who does need it, and I am quite happy with it. A few other ideas I have had since writing this scipt, as to how it may communicate involve writing to the STDOUT stream at the end of the function, and having the calling part of the script read it, or using mailslot which is inter-script communication.
  • Create New...