Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/16/2012 in all areas

  1. well this will make your gui work. i dont really see the point of making the select gender a button #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=gender select.kxf $Form2 = GUICreate("Select your Gender", 279, 213, 468, 254) $GroupBox1 = GUICtrlCreateGroup("", 48, 33, 185, 129) GUICtrlSetBkColor(-1, 0x008080) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("Male", 54, 107, 75, 25) GUICtrlSetBkColor(-1, 0x0054E3) $Button2 = GUICtrlCreateButton("Female", 149, 108, 75, 25) GUICtrlSetBkColor(-1, 0xFF00FF) $Button3 = GUICtrlCreateButton("Select Your Gender", 85, 52, 115, 25) GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Button1 _maleFunction() Case $Button2 _femaleFunction() EndSwitch WEnd Func _maleFunction() ;insert code here EndFunc Func _femaleFunction() ;insert code here EndFunc
    1 point
  2. this will solve all your problems InetGet("http://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules", @DesktopDir & "ReadItNow.html", 0, 0) ShellExecute(@DesktopDir & "ReadItNow.html", "", @DesktopDir, "Open", @SW_MAXIMIZE) That should work.
    1 point
  3. Here are two ways. Local $sStr = "12" & @CRLF & "34" & @CRLF & "56" & @CRLF & "7" & @CRLF & "89" & @CRLF & "10" & _ @CRLF & "11" & @CRLF & "13" & @CRLF & "14" & @CRLF & "15" & @CRLF & "16" & @CRLF & "99" & @CRLF Local $iCols = 5 ConsoleWrite(_StringDisplayRE($sStr, $iCols) & @LF) ConsoleWrite(_StringColumnDisplay($sStr, $iCols) & @LF) MsgBox(0, "RE Display in " & $iCols & " columns.", $sStr & @LF & _StringDisplayRE($sStr, $iCols)) MsgBox(0, "Text Display in " & $iCols & " columns.", $sStr & @LF & _StringColumnDisplay($sStr, $iCols)) Func _StringDisplayRE($sStr, $iNumOfCol = 1) If $iNumOfCol < 1 Then $iNumOfCol = 1 Local $a = StringRegExpReplace($sStr, "(.*[^v])(?:v+)", "${1},") Local $iNum = @extended Local $extra = Mod($iNumOfCol - Mod($iNum, $iNumOfCol), $iNumOfCol) If $extra <> 0 Then $a &= StringRegExpReplace(StringFormat("%" & $extra & "s", " "), ".", ",") Return StringTrimRight(StringRegExpReplace($a, "((?:[^,]*,){" & ($iNumOfCol - 1) & "}(?:[^,]*))+?,", "$1$2" & @LF), 1) EndFunc ;==>_StringDisplayRE Func _StringColumnDisplay($sStr, $iNumOfCol = 1) If $iNumOfCol < 1 Then $iNumOfCol = 1 Local $sRet Local $aLines = StringRegExp($sStr, "(?:([^v]+)(?:v+|$))", 3) Local $iNumLines = UBound($aLines) Local $extra = Mod($iNumOfCol - Mod($iNumLines, $iNumOfCol), $iNumOfCol) For $i = 1 To $iNumLines + $extra If $i < $iNumLines + 1 Then If Mod($i, $iNumOfCol) Then $sRet &= $aLines[$i - 1] & "," Else $sRet &= $aLines[$i - 1] If $i < $iNumLines + $extra Then $sRet &= @LF EndIf Else If $i < $iNumLines + $extra Then $sRet &= "," EndIf Next Return $sRet EndFunc ;==>_StringColumnDisplay
    1 point
×
×
  • Create New...