Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/17/2017 in all areas

  1. This UDF allows to create pseudo TreeViewTab control (tabs as TreeView). Useful for Settings dialog. Notes: Example: Download: TreeViewTab_1.2.zip TreeViewTab_1.1.zip Changelog:
    1 point
  2. Believe I figured out the issue: You need to turn off sorting of the listbox otherwise the index in $oSpellCollection won't match the listbox. $Listbox1 = GUICtrlCreateList("", 24, 168, 137, 97, BitOR($WS_BORDER, $WS_VSCROLL)) $Listbox2 = GUICtrlCreateList("", 232, 168, 137, 97, BitOR($WS_BORDER, $WS_VSCROLL))
    1 point
  3. Noticed an error in _SpellingSuggestions2 where you used $oAlternateWords.Count rather than $oAlternateWords2.Count. Not really sure what the intention of $ssWord = $oSpellCollection.Item($iWord).Text was so just changed it to get the text directly from the listbox which works for me. Func _SpellingSuggestions() Local $iWord, $ssWord ; _GUICtrlListBox_ResetContent($ListBox2) GUICtrlSetState($Button5, $GUI_DISABLE) $ssWord = _GUICtrlListBox_GetText($ListBox1, _GUICtrlListBox_GetCurSel($ListBox1)) $oAlternateWords = $oWordApp.GetSpellingSuggestions($ssWord) If $oAlternateWords.Count > 0 Then For $i = 1 To $oAlternateWords.Count _GUICtrlListBox_AddString($ListBox2, $oAlternateWords.Item($i).Name) Next Else _GUICtrlListBox_AddString($ListBox2, "No suggestions.") EndIf EndFunc ;==>_SpellingSuggestions Func _SpellingSuggestions2() Local $iWord2, $ssWord2 ; _GUICtrlListBox_ResetContent($ListBox4) GUICtrlSetState($Button5, $GUI_DISABLE) $ssWord2 = _GUICtrlListBox_GetText($ListBox3, _GUICtrlListBox_GetCurSel($ListBox3)) $oAlternateWords2 = $oWordApp.GetSpellingSuggestions($ssWord2) If $oAlternateWords2.Count > 0 Then For $i = 1 To $oAlternateWords2.Count _GUICtrlListBox_AddString($ListBox4, $oAlternateWords2.Item($i).Name) Next Else _GUICtrlListBox_AddString($ListBox4, "No suggestions.") EndIf EndFunc ;==>_SpellingSuggestions
    1 point
  4. @MattHiggs Actually was able to get it working today, previously the second form would only display briefly then disappear, so had to place a MsgBox just to see the Spell Check form. Anyway in the _SpellCheck function remove or comment out the following as these have already been defined at the beginning of your script and this should utilize both documents, basically the commands below are both just saying get the ActiveDocument in Word as a Range, this meant it was always the last document that was being used. Hope that made sense. $oRange = $oWordApp.ActiveDocument.Range ... $oRange2 = $oWordApp2.ActiveDocument.Range
    1 point
  5. TheSaint

    AutoIt Snippets

    Just pure logic dear Watson.
    1 point
  6. post a location you got it from I checked in my MySQL.au3 file and _MySQL_Real_Query is located in 1555 line
    1 point
  7. Here is my spell check function: #include <GuiEdit.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Word.au3> Local $hGui = GUICreate("Spell Checker", 461, 212) Local $idString = GUICtrlCreateEdit('“To be, or not to be…that is the question” This wellknown utterance has been the source of both mystery and wonderment for students around the world since the turn of the 16th century—arguably the zenith of Shakespeare’s creative output. However, the mere ubiquity of this phrase fails to answer some basic questions about it’s rather context. Where did it come from what does it mean? The first of these questions (where does it come from?) can be answered fairly easily: from Shakespeare’s famous play Hamlet.', 7, 23, 330, 81, BitOR($WS_VSCROLL, $ES_AUTOVSCROLL)) Local $idSpellCheck = GUICtrlCreateButton("Check Spelling", 346, 23, 107, 22) Local $idUpdate = GUICtrlCreateEdit('', 7, 123, 330, 81, BitOR($WS_VSCROLL, $ES_AUTOVSCROLL)) Local $idCloseGui = GUICtrlCreateButton("Close", 346, 183, 107, 22) ControlFocus($hGui, "", $idSpellCheck) GUISetState() While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit Case $idCloseGui Exit Case $idSpellCheck GUICtrlSetData($idUpdate, _SpellCheck(GUICtrlRead($idString))) EndSwitch WEnd Func _SpellCheck($sStringCheck) Local Const $wdDialogToolsSpellingAndGrammar = 828 ;~ Word Spelling and Grammar Dialog Window Local $oWord, $oDoc, $sSpellCheck = $sStringCheck $oWord = _Word_Create(False) With $oWord ;.Visible = False $oDoc = .Documents.Add .Selection.Text = $sSpellCheck .Dialogs($wdDialogToolsSpellingAndGrammar).Show $sSpellCheck = .Selection.Text $oDoc.Close($wdDonotSaveChanges) .Quit($wdDonotSaveChanges) EndWith Return $sSpellCheck = "" ? $sStringCheck : $sSpellCheck EndFunc
    1 point
×
×
  • Create New...