Leaderboard
Popular Content
Showing content with the highest reputation on 04/17/2015 in all areas
-
Major Forum Upgrade Incoming
jaberwacky and one other reacted to Jon for a topic
A short users guide to the IPB v4 new forum - this will be reposted and pinned after the upgrade. This is just an advance warning The forum operates in much the same way as the old v3 one, but there are several major differences - so here is a quick guide: Firstly login: This requires displayname/password - not username/password as before. Next the editor: This is now full WYSIWYG using HTML and seems a lot better than the v3 one. There are buttons to add hyperlinks, quotes, code and spoilers, plus Trac links . It is recommended NOT to use the basic editor as BB codes no longer work and so it is difficult to enter anything other than plain text. Posting links to threads/posts is easy: Posting a thread/post URL (use the "share this post" button at top right to get a post URL) directly into the editor actually inserts a clickable single line box. Using the editor "link" button lets you choose clickable text to display in place of the box. The "code" button gives a choice of "AutoIt" (with syntax highlighting) or plain "Text". Code over a certain length still appears in scrollable boxes, but these no longer have "expand/popup" buttons - just click on the code and it is all automatically selected. Paragraph spacing is automatically applied when pressing {ENTER} - use {Shift-ENTER} for single lines. Now the member details: The dropdown under the member name at top right still accesses things such as Private Messages, Content, Followed Content. To change display name, signature, password, go to "Account Settings" How members are notified of forum events has changed - check to find out how previous settings have been transferred because there are now some forced choices where the notification will be in-forum rather than by email. The "Friend" functionality has been replaced by the ability to "Follow" other members - this is done via a button on their profile page.2 points -
@TheDcoder: please stop hijacking my topic by posting bullshit. Go and play in the sandbox if you want to be childish.2 points
-
Hello ! Here is a small function which allows you to make changes in the Firefox configuration file (of the user running the script) Warning : to make changes into the configuration file, Firefox must be stopped Here you can find some settings in this webpage : http://kb.mozillazine.org/About:config_entries Examples : ; Changes the start page _FF_Config("browser.startup.homepage", "http://www.autoitscript.com/forum") ; Set a manual proxy _FF_Config("network.proxy.type", 1) ; Sets the proxy in manual mode _FF_Config("network.proxy.http", "192.168.1.10") ; Sets the http proxy name/IP _FF_Config("network.proxy.http_port", 3128) ; Sets the http proxy port _FF_Config("network. proxy. autoconfig_url") ; Remove the proxy url ; Allow popups _FF_Config("dom.disable_open_during_load", false) Also, you can use _FF_GetProfileList() to retrieve the list of Firefox profiles for the current user. Now, the two functions : #include <File.au3> ; needed for _PathFull ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FF_Config ; Description ...: Configures Mozilla Firefox ; Syntax ........: _FF_Config($sSettingName[, $sSettingValue = Null[, $sProfileName = ""]]) ; Parameters ....: $sSettingName - Name of the setting to add, change or delete. ; $sSettingValue - [optional] Value of the setting. Default is Null = deletes the line. ; $sProfileName - [optional] Name of the Firefox profile. Default is "" = all Firefox profiles ; Return values .: Success - Returns 1 ; Failure - Returns 0 and set @error to : ; 1 : Unable to list the Firefox profiles ; 2 : Unable to load the specified Firefox profile ; 3 : Firefox is running ; Author ........: jguinch ; =============================================================================================================================== Func _FF_Config($sSettingName, $sSettingValue = Null, $sProfileName = "") Local $sFFConfigFile = "prefs.js" Local $sContent, $aProfiles = _FF_GetProfileList(), $iError = 0, $hPrefs If @error Then Return SetError(@error, 0, 0) If ProcessExists("firefox.exe") Then Return SetError(3, 0, 0) If IsString($sSettingValue) Then $sSettingValue = '"' & $sSettingValue & '"' If IsBool($sSettingValue) Then $sSettingValue = StringLower($sSettingValue) For $i = 1 To $aProfiles[0][0] If $sProfileName <> "" AND $aProfiles[$i][0] <> $sProfileName Then ContinueLoop $sContent = FileRead($aProfiles[$i][1] & "\" & $sFFConfigFile) If @error Then Return SetError(2, 0, 0) If $sSettingValue = Null Then $sNewContent = StringRegExpReplace($sContent, '(?mi)^\Quser_pref("' & $sSettingName & '"\E\V+\R', '') Else $sNewContent = StringRegExpReplace($sContent, '(?mi)^\Quser_pref("' & $sSettingName & '", \E\K.+(?=\);$)', $sSettingValue) If NOT @extended Then $sNewContent = StringRegExpReplace($sContent, ";\K\v*$", @CRLF & 'user_pref("' & $sSettingName & '", ' & $sSettingValue & ');' & @CRLF) EndIf $hPrefs = FileOpen($aProfiles[$i][1] & "\" & $sFFConfigFile, 2) If $hPrefs = -1 Then Return SetError(2, 0, 0) FileWrite($hPrefs, $sNewContent) FileClose($hPrefs) Next Return 1 EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _FF_GetProfileList ; Description ...: List the Firefox profiles in a 2D array ; Syntax ........: _FF_GetProfileList() ; Parameters ....: None ; Return values .: Success - Returns a 2D array (see remarks) ; Failure - Returns 0 and set @error to 1 (unable to list the Firefox profiles) ; Author ........: jguinch ; Remarks........: The array returned is two-dimensional and is made up as follows: ; $aArray[0][0] : Number of profiles ; $aArray[0][1] : Default profile index in the array ; $aArray[1][0] : 1st profile name ; $aArray[1][1] : 1st profile path ; ... ; $aArray[n][0] : nth profile name ; $aArray[n][1] : nth profile path ; =============================================================================================================================== Func _FF_GetProfileList() Local $sProfileName, $sIsRelative, $sProfilePath, $aResult[10][2] = [[0]] Local $sFFAppDataPah = @AppDataDir & "\Mozilla\Firefox" Local $sProfiles = $sFFAppDataPah & "\profiles.ini" Local $aSections = IniReadSectionNames($sProfiles) If @error OR NOT IsArray($aSections) Then Return SetError(1, 1, 0) For $i = 1 To $aSections[0] If $aSections[$i] <> "General" Then $sProfileName = IniRead($sProfiles, $aSections[$i], "Name", "") $sIsRelative = IniRead($sProfiles, $aSections[$i], "IsRelative", "") $sProfilePath = IniRead($sProfiles, $aSections[$i], "Path", "") If $sIsRelative = "" OR $sProfilePath = "" OR $sProfileName = "" Then ContinueLoop If Number($sIsRelative) = 1 Then $sProfilePath = _PathFull( @AppDataDir & "\Mozilla\Firefox\" & StringReplace($sProfilePath, "/", "\") ) If NOT FileExists($sProfilePath & "\prefs.js") Then ContinueLoop $aResult[0][0] += 1 If $aResult[0][0] = UBound($aResult) Then Redim $aResult[ UBound($aResult) * 2][2] If Number(IniRead($sProfiles, $aSections[$i], "Default", "error")) = 1 Then $aResult[0][1] = $aResult[0][0] $aResult[ $aResult[0][0] ][0] = $sProfileName $aResult[ $aResult[0][0] ][1] = $sProfilePath EndIf Next If NOT $aResult[0][1] AND $aResult[0][0] > 0 Then $aResult[0][1] = 1 Redim $aResult [ $aResult[0][0] + 1 ][2] Return $aResult EndFunc1 point
-
In the next week or so the forum will be upgraded to IPB4. I'm currently testing features with the MVPs. The upgrade should take a couple of hours so the site will be offline for that time. When it comes back online there are still about 12 hours worth of background tasks that will begin. During these background tasks a lot of content will look incorrect or be completely broken: Search offline Emoticons Quotes / Trac links / Topic links - pretty much anything with BBCodes AutoIt/Plaintext code should look correct straight away - I'm pre-converting it myself. However we will have to switch to Prettify for code highlighting and direct links from code into documentation will no longer work. Do not re-edit your old posts during this time with the intention of cleaning them up. It will happen automatically and you are just wasting time. I'll post status updates of the rebuild process and when it is complete. The new site is a responsive design and therefore works much better on small devices. There is no "mobile" skin anymore. But obviously the look might not be to everyone's taste. I'm happy to tweak the template a little to fix minor cosmetic annoyances but I'm not going to go crazy with it as all the tweaks need to be redone on each upgrade. If you want to have a taste then look the IPB main site at http://community.invisionpower.com/1 point
-
After wakillon has provided the SID player code, I thought it's time to write a little intro in old school style with chip music from the old good C64. Here the result (download exe + source): CoSiNUs brOTHerS inTRO I hope it works properly on your PC. If not please report. WinXP is not supported! If your CPU is too weak to display the effects properly, change the line 118 the value 30 to 40 DllCall("user32.dll", "int", "SetTimer", "hwnd", $hGUI, "int", 0, "int", 30, "int", 0) or a higher value or reduce in line 28 the $iStripes value to e.g. $iH / 3. Global $i, $c = 0, $j = 0, $f, $l, $k = 0, $m, $iStripes = $iH / 2 On my notebook the intro runs at ~30 fps! Have fun. @wakillon: Merci beaucoup! Screenshot: https://autoit.de/index.php/Attachment/115-CoSiNUs-brOTHerS-inTRO-png/ How it should look like (without sound):1 point
-
Can i change cell color in excel with autoit ?
kcvinu reacted to JohnQSmith for a topic
Just use an RGB color chart and swap the R and the B.1 point -
Hello, Hope this helps: #include <EXCEL.AU3> Local $oAppl = _Excel_Open(True, False, True, True, True) Local $oWorkbook = _Excel_BookNew($oAppl, 1) With $oAppl.ActiveWorkbook.Sheets(1) .Range("A1:A1").Interior.Color = 0x330099 EndWith Please note that color codes in excel are BGR and not RGB Other fun commands: .Range("A1:A1").Font.Bold = True .Range("A1:A1").Font.Color = 0xFFFFFF .Range("A1:A1").Borders.Color = 0x0000001 point
-
dzlee, That is not what you asked the first time - please try and be specific when you ask questions so we do not waste our time writing code which will obviously not meet the requirement. I suggest you store the input ControlIDs in an array and then loop through it like this: #include <GUIConstantsEx.au3> #include <EditConstants.au3> Global $aInput[3] $hGUI = GUICreate("Test", 500, 500) $aInput[0] =_CreateInput("Input 0", 10, 10, 200, 20) $aInput[1] =_CreateInput("Input 1", 10, 50, 200, 20) $aInput[2] =_CreateInput("Input 2", 10, 90, 200, 20) $cToggle = GUICtrlCreateButton("Editable", 10, 200, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cToggle Switch GUICtrlRead($cToggle) Case "Editable" For $i = 0 To 2 GUICtrlSetStyle($aInput[$i], BitOr($ES_LEFT, $ES_AUTOHSCROLL)) Next GUICtrlSetData($cToggle, "Read Only") Case Else For $i = 0 To 2 GUICtrlSetStyle($aInput[$i], BitOr($ES_LEFT, $ES_AUTOHSCROLL, $ES_READONLY)) Next GUICtrlSetData($cToggle, "Editable") EndSwitch EndSwitch WEnd Func _CreateInput($sText, $iX, $iY, $iW, $iH) Local $cID = GUICtrlCreateInput($sText, $iX, $iY, $iW, $iH) GUICtrlSetStyle($cID, BitOr($ES_LEFT, $ES_AUTOHSCROLL, $ES_READONLY)) Return $cID EndFunc Better? M231 point
-
dzlee, You will have to set that style for each input as it is created. But you could shorten the process by using a wrapper function like this: #include <GUIConstantsEx.au3> #include <EditConstants.au3> $hGUI = GUICreate("Test", 500, 500) $cInput1 =_CreateInput("Input 1", 10, 10, 200, 20) ; Use the wrapper function to create the input $cInput2 =_CreateInput("Input 2", 10, 50, 200, 20) $cInput3 =_CreateInput("Input 3", 10, 90, 200, 20) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _CreateInput($sText, $iX, $iY, $iW, $iH) Local $cID = GUICtrlCreateInput($sText, $iX, $iY, $iW, $iH) ; Create input GUICtrlSetStyle($cID, BitOr($ES_LEFT, $ES_AUTOHSCROLL, $ES_READONLY)) ; Set required style Return $cID EndFunc How does that suit your requirements? M231 point
-
Running multiple GUI issue
Beetlebailey reacted to Jos for a topic
I haven't tested but should the second gui selection look something like this?: Case $msg = $Page2 GUICtrlSetState($Page2, $GUI_Disable) Local $hGui2=gui2() $aMsg = GUIGetMsg($hGui2) Switch $aMsg Case $GUI_EVENT_CLOSE ExitLoop Case $GUI_EVENT_CLOSE ExitLoop EndSwitch GUIDelete($gui2) GUICtrlSetState($Page2, $GUI_ENABLE) Are you running au3check by using the full installer of SciTE4AutoIt3? I get some errors like: script.au3"(22,24) : error: Opt() called with illegal argument 1: "MustDeclareVar". Opt("MustDeclareVar", 1) ~~~~~~~~~~~~~~~~~~~~~~~^ which should be: "MustDeclareVars" Jos1 point -
Weird texts in the English version too. Like "Please forgive me and do the right thing". Not sure what that even means. Can you try and improve the clarity? It's not like better input guarantees better translation feedback, but sub-par input certainly caps the quality. (Or, as some people like to say, gigo )1 point
-
@psandu.ro _GUICtrlStatusBar_Create() (CreateWindowEx API child window) is not a native AutoIt control, so it does not have its messages processed by the MessageLoop or OnEvent mode. you have to subclass the StatusBar window to receive messages from any embedded controls otherwise you have to read the control directly by control ID (GuiCtrlRead()) or by handle. try this example Cheers Edit replaced first example with code to handle button repaint and resizing as there are issues with embedded controls not being repainted or resized with parent gui ;the usual paint and resize issues apply with the StatusBar not being native AutoIt code ;Note: if using a resizable gui you need to recalculate StatusBar parts #include <GUIConstantsEX.au3> #include <Constants.au3> #include <WindowsConstants.au3> #include <GuiStatusBar.au3> #include <GuiButton.au3> Local $aparts[3] = [80, 160, -1] $hgui = GUICreate("StatusBar Embed Control", 400, 300, -1, -1, BitOr($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX,$WS_MAXIMIZEBOX)) $button = GUICtrlCreateButton('Ok', 0, 0, 100, 20) $hstatus = _GUICtrlStatusBar_Create($hgui) _GUICtrlStatusBar_SetParts($hstatus, $aparts) _GUICtrlStatusBar_SetText($hstatus, "Part 1") _GUICtrlStatusBar_SetText($hstatus, "Part 2", 1) ;$hBtnStatusBar = _GUICtrlButton_Create($hgui, "Ok", 0, 0, 0, 0) $cBtnStatusBar = GUICtrlCreateButton('Ok', 0, 0) $hBtnStatusBar = GUICtrlGetHandle($cBtnStatusBar) $cBtnDummy = GUICtrlCreateDummy() _GUICtrlStatusBar_EmbedControl($hstatus, 2, $hBtnStatusBar) ; subclass StatusBar window: $wProcNew = DllCallbackRegister("_StatusBarWindowProc", "int", "hwnd;uint;wparam;lparam") $wProcOld = _WinAPI_SetWindowLong($hstatus, $GWL_WNDPROC, DllCallbackGetPtr($wProcNew)) GUIRegisterMsg($WM_SIZE, "_WM_SIZE") GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case -3 ;Delete StatusBar window callback function _WinAPI_SetWindowLong($hstatus, $GWL_WNDPROC, $wProcOld) DllCallbackFree($wProcNew) Exit 0 Case $button MsgBox(262144, '', 'Main form button is pressed!') Case $cBtnDummy MsgBox(262144, '', 'StatusBar button is pressed!') EndSwitch WEnd Func _WM_SIZE() _GUICtrlStatusBar_Resize($hstatus) Return $GUI_RUNDEFMSG EndFunc Func _StatusBarWindowProc($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam, $lParam Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0x0000FFFF) Switch $Msg Case $WM_COMMAND Switch $lParam Case $hBtnStatusBar ;ConsoleWrite('-$nID = ' & $nID & @crlf) ;ConsoleWrite('-$nNotifyCode = ' & $nNotifyCode & @crlf) Switch $nNotifyCode Case $BN_CLICKED GUICtrlSendToDummy($cBtnDummy) ;ConsoleWrite("$BN_CLICKED" & @CRLF) EndSwitch EndSwitch Case $WM_NCPAINT ;update button position when StatusBar repainted (when gui resized or restored from minimized) ;must be better way of doing this _GUICtrlStatusBar_EmbedControl($hstatus, 2, $hBtnStatusBar) EndSwitch ; pass the unhandled messages to default WindowProc Return _WinAPI_CallWindowProc($wProcOld, $hWnd, $Msg, $wParam, $lParam) EndFunc ;==>_NewWindowProc1 point