zackrspv Posted March 14, 2008 Share Posted March 14, 2008 (edited) So, I'm lost. I have written the below script, I really don't like sharing it because it is suposed to be private, but whatever. For some reason, I cannot for the life of me, hide $listview Hiding listview should take place throughout the entire application, you'll note that most of the radio's call it to hide. But it just doesn't do that. I really want to hide it when i minimize my ie area: expandcollapse popup;- Expand offline kb to full case $KBExpandIN guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($listviewMIN, $GUI_SHOW) guictrlsetstate($GUIActiveXKB, $GUI_HIDE) guictrlsetstate($KBExpandIE, $GUI_SHOW) guictrlsetstate($KBExpandIN, $GUI_HIDE) guictrlsetstate($KBExpandOUT, $GUI_show) $fQuery = Guictrlread($Input1, 1) call("goOKB")[/code] Why is it doing this to me? [code];- ////////////// Compilation options ////////////// #AutoIt3Wrapper_outfile=search.exe #AutoIt3Wrapper_Compression=4 ;- ////////////// Includes ////////////// #include <INet.au3> #include <GUIConstants.au3> #include <IE.au3> #include <_AnimatedGIF.au3> #include <Array.au3> #include <file.au3> ;- /////////// Define Declarations (to avoid errors) //////////////// $msg = "" $item = "" $str2 = "" $str = "" $item2 = "" $sopt = "Search Definitions" $Input1 = "" $kbSelect = "" $fQuery = "" $okbID = "" $okbIDdef = "" ;- ////////////// Create Information ////////////// $Form1 = GUICreate("Information Tool", 1027, 600) ;- ////////////// SETUP IE HANDLER for KnowledgeBase Not Exapnded //////////////// _IEErrorHandlerRegister () $KBoIE = _IECreateEmbedded () $GUIActiveXKB = GUICtrlCreateObj($KBoIE, 425, 40, 420, 552) ;- ////////////// SETUP IE HANDLER for Websites //////////////// _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $GUIActiveX = GUICtrlCreateObj($oIE, 0, 40, 849, 550) ;- ////////////// SETUP IE HANDLER for Knowledge Base Expanded //////////////// _IEErrorHandlerRegister () $KBoieExpand = _IECreateEmbedded () $KBExpandIE = GUICtrlCreateObj($KBoieExpand, 62, 40, 849, 550) ;- ////////////// END SETUP IE HANDLER //////////////// ;- ////////////// SETUP IE BUTTONS //////////////////// $GUI_Button_Refresh = GuiCtrlCreateButton("Refresh", 243, 12, 60, 22) $ieprogress = GUICtrlCreateProgress(307, 13, 99, 20, $PBS_SMOOTH) $GUI_Button_Back = GUICtrlCreateButton("Back", 410, 12, 60, 22) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 470, 12, 60, 22) $GUI_Button_Home = GUICtrlCreateButton("Home", 530, 12, 60, 22) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 590, 12, 60, 22) ;~ /////////////////////// SETUP MAIN WINDOWS /////////////////////////////////////// ;- //// Setup main Expanded ListView ////////// $listview = GUICtrlCreateList("",0,40,410, 552);,$LVS_SORTDESCENDING) GUICtrlSetLimit(-1,200); to limit horizontal scrolling ;- //// Setup NonExpanded ListView ////////// $listviewMIN = GUICtrlCreateList("",0,40,40, 552);,$LVS_SORTDESCENDING) GUICtrlSetLimit(-1,200); to limit horizontal scrolling ;- /////////// Create Expand out Button ///////////// $KBExpandOUT = Guictrlcreatebutton(">", 42, 42, 10, 552) ;- /////////// Create Expand IN Button ///////////// $KBExpandIN = Guictrlcreatebutton("<", 412, 38, 10, 556) ;- /////////// Create Display Result Button for the list's to pull pages ///////////// $kbSelectdd = GUICtrlCreateButton("Display Result", 302, 12, 105, 24) ;- /////////// Create Find Button to search Offline KB ///////////// $kbGOSelect = GUICtrlCreateButton("Find", 245, 12, 45, 24) ;- /////////// Create Edit section for Results on Terms ///////////// $Edit1 = GUICtrlCreateEdit("", 0, 40, 849, 553, BitOR($WS_VSCROLL, $ES_READONLY)) GUICtrlSetData(-1, "Results will display here...") GUICtrlSetFont($Edit1, 9, 500) GUICtrlSetBkColor($Edit1, 0xFFFFFF) GUISetBkColor(0x525C65) ;- /////////// Create Edit for Terms ///////////// $Terms = GUICtrlCreateEdit("", 0, 40, 350, 553, BitOR($WS_VSCROLL, $ES_READONLY)) GUICtrlSetData(-1, "List of Terms...") GUICtrlSetFont($Terms, 9, 500) GUICtrlSetBkColor($Terms, 0xFFFFFF) ;- /////////// Create Edit for Defs ///////////// $Defs = GUICtrlCreateEdit("", 355, 40, 494, 553, BitOR($WS_VSCROLL, $ES_READONLY)) GUICtrlSetData(-1, "Investment Terms Search Results....") GUICtrlSetFont($Defs, 9, 500) GUICtrlSetBkColor($Defs, 0xFFFFFF) ;- /////////// Search Options Label background //////// guictrlcreatelabel("", 857, 43, 159, 162) GUICtrlSetBkColor(-1, 0xFFFFFF) guictrlsetstate(-1, $GUI_DISABLE) ;- /////////// Quick Links Label background //////// guictrlcreatelabel("", 857, 242, 159, 89) GUICtrlSetBkColor(-1, 0xFFFFFF) guictrlsetstate(-1, $GUI_DISABLE) ;- ////////// Create progress window ////////////// $Progress1 = GUICtrlCreateProgress(856, 210, 161, 17, $PBS_SMOOTH) ;- ///////// Create input box, primary search bar //////////// $Input1 = GUICtrlCreateInput("Search Term", 4, 15, 235, 21) ;- ///////// creat search options group /////////// $sgroupoptions = GUICtrlCreateGroup("Search Options", 856, 36, 161, 169) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio1 = GUICtrlCreateRadio("Search Definitions", 864, 60, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio2 = GUICtrlCreateRadio("Investment Search", 864, 84, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio3 = GUICtrlCreateRadio("Google Search", 864, 109, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio4 = GUICtrlCreateRadio("Knowledge Base", 864, 134, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio5 = GUICtrlCreateRadio("Open Website", 864, 160, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $Radio6 = GUICtrlCreateRadio("Offline KB", 864, 185, 113, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) ;- ///////// creat search dynamic buttons /////////// $searchgoog = GUICtrlCreateButton("Search Definitions", 243, 14, 95, 24) $searchterms = GUICtrlCreateButton("Search Investment Terms", 243, 14, 155, 24) $searchdefs = Guictrlcreatebutton("Search Investment Definitions", 399, 14, 169, 24) ;- ///////// create a combo box for the did you mean options /////////// $Combo1 = GUICtrlCreateCombo("Combo1", 472, 16, 177, 25) $comboLable1 = GUICtrlCreateLabel("Did you Mean:", 392, 16, 73, 17) GUICtrlSetColor(-1, 0xFFFFFF) ;- ///////// Create quick links group /////////////// $slinkoptions = GUICtrlCreateGroup("Quick Links", 856, 235, 161, 97) GUICtrlSetBkColor(-1, 0xFFFFFF) $BTCTools = GUICtrlCreateLabel("My Tools", 872, 253, 54, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $GSearch = GUICtrlCreateLabel("Google Search", 872, 273, 75, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $IVPSearch = GUICtrlCreateLabel("Invest'o Pedia Search", 872,293, 108, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) $UDS = GUICtrlCreateLabel("Urban Dictionary Search", 872, 313, 120, 17) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlCreateGroup("", -99, -99, 1, 1) ;- /////////// HIDE undesired startup windows ///////////////// GUICtrlSetState($Progress1, $GUI_HIDE) GUICtrlSetState($Terms, $GUI_HIDE) GUICtrlSetState($Defs, $GUI_HIDE) GUICtrlSetState($Combo1, $GUI_HIDE) GUICtrlSetState($comboLable1, $GUI_HIDE) GUICtrlSetState($searchdefs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) GUICtrlSetState($GUIActiveXKB, $GUI_HIDE) GUICtrlSetState($GUIActiveX, $GUI_HIDE) GUICtrlSetState($KBExpandIE, $GUI_HIDE) GUICtrlSetState($GUI_Button_Refresh, $GUI_HIDE) GUICtrlSetState($GUI_Button_Back, $GUI_HIDE) GUICtrlSetState($GUI_Button_Forward, $GUI_HIDE) GUICtrlSetState($GUI_Button_Home, $GUI_HIDE) GUICtrlSetState($GUI_Button_Stop, $GUI_HIDE) GUICtrlSetState($ieprogress, $GUI_HIDE) guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($listviewMIN, $GUI_HIDE) guictrlsetstate($KBExpandOUT, $GUI_HIDE) guictrlsetstate($KBExpandIN, $GUI_HIDE) guictrlsetstate($kbSelectdd, $GUI_HIDE) guictrlsetstate($kbGOSelect, $GUI_HIDE) guictrlsetstate($Progress1, $GUI_HIDE) ;- //////////// Check radio1 as the default ////////////////// GUICtrlSetState($Radio1, $GUI_CHECKED) ;- /////////////// SETUP FUNCTIONS ///////////////// ;- ////////////// Function: goIE /////////////////// ;- /////// Purpose: search google defines ////////// ;- ///////////////////////////////////////////////// Func goIE() _IENavigate ($oIE, "http://www.google.com/search?hl=en&q="&$item&"&btnG=Google+Search", 0) guictrlsetstate($ieprogress, $GUI_SHOW) while _IEPropertyGet($oIE, "busy") = -1 for $i = 0 to 100 guictrlsetdata($ieprogress, $i) sleep(5) Next WEnd guictrlsetstate($ieprogress, $GUI_HIDE) EndFunc ;- ////////////// Function: goWeb /////////////////// ;- /////// Purpose: open a website ////////// ;- ///////////////////////////////////////////////// Func goWeb() _IENavigate ($oIE, $item, 0) guictrlsetstate($ieprogress, $GUI_SHOW) while _IEPropertyGet($oIE, "busy") = -1 for $i = 0 to 100 guictrlsetdata($ieprogress, $i) sleep(5) Next WEnd guictrlsetstate($ieprogress, $GUI_hide) EndFunc ;- ////////////// Function: _ArrayFindAll /////////////////// ;- /////// Purpose: Find all search terms in array ////////// ;- ////////////////////////////////////////////////////////// Func _ArrayFindAll($iArray, $iQuery, $iStart = 0, $iEnd = 0, $iCaseSense = 0, $fPartialSearch = True) Local $Rtn = '' While 1 $aSrch = _ArraySearch($iArray, $iQuery, $iStart, $iEnd, $iCaseSense, $fPartialSearch) If $aSrch <> -1 Then $Rtn &= $aSrch & '|' $iStart = $aSrch + 1 ;~ If $iStart >= $iEnd Then ExitLoop Else ExitLoop EndIf Wend If $Rtn <> '' Then $Rtn = StringSplit(StringTrimRight($Rtn, 1), '|') Return $Rtn Else Return SetError(1, 1, 'No matches to your query were found') EndIf EndFunc ;- ////////////// Function: goOKB //////////////////////////////// ;- /////// Purpose: Populate $listview with search data ////////// ;- /////////////////////////////////////////////////////////////// Func goOKB() guictrlsetdata($listview, "") guictrlsetstate($kbSelect, $GUI_SHOW) guictrlsetstate($listview, $GUI_SHOW);- /// Show listview if hidden //// $datas = "" $select = "" $data = "" Dim $aRecords If Not _FileReadToArray(@ProgramFilesDir&"\DIR\db.txt",$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf If IsArray($aRecords) Then $Found = _ArrayFindAll($aRecords, $fQuery) If IsArray($Found) Then For $I = 1 To $Found[0] guictrlsetdata($listview, $aRecords[$Found[$I]]) Next Else MsgBox(0,'No Matches', $Found) EndIf EndIf EndFunc Func goOKB_GetDef() $okbIDdef = guictrlread($listview, 1) $okbID = StringLeft($okbIDdef, 5) _IENavigate ($KBoIE, "file://"&@ProgramFilesDir&"/DIR/"&$okbID&".html", 0) EndFunc ;- ////////////// Function: goKB //////////////////////////////// ;- /////// Purpose: Open webpage to our KB site ///////////////// ;- ////////////////////////////////////////////////////////////// Func goKB() _IENavigate ($oIE, "http://kb.mysite.com/", 0) guictrlsetstate($ieprogress, $GUI_SHOW) while _IEPropertyGet($oIE, "busy") = -1 for $i = 0 to 100 guictrlsetdata($ieprogress, $i) sleep(5) Next WEnd guictrlsetstate($ieprogress, $GUI_hide) EndFunc ;- ////////////// Function: goSearch ////////////////////////////////////////// ;- /////// Purpose: Do a google define search of term in $input1 ///////////// ;- ////////////////////////////////////////////////////////////////////////// Func gSearch() $source = "" $str = "" $str2 = "" GUICtrlSetState($Terms, $GUI_HIDE) GUICtrlSetState($Defs, $GUI_HIDE) GUICtrlSetState($Combo1, $GUI_HIDE) GUICtrlSetState($comboLable1, $GUI_HIDE) GUICtrlSetState($Progress1, $GUI_SHOW) GUICtrlSetState($Edit1, $GUI_SHOW) $item = StringReplace($item2, " ", "+") $source = (_INetGetSource("http://www.google.com/search?hl=en&q=define%3A+" & $item & "&btnG=Google+Search")) For $i = 0 To 100 GUICtrlSetData($Progress1, $i) Sleep(5) GUICtrlSetData($Progress1, 0) Next GUICtrlSetState($Progress1, $GUI_HIDE) If StringInStr($source, "Did you Mean", 0) = "0" Then Else GUICtrlSetState($Combo1, $GUI_SHOW) GUICtrlSetState($comboLable1, $GUI_SHOW) $nOffset = 1 $str = "" While 1 $array = StringRegExp($source, 'class=p>define: (.*?)</i>', 1, $nOffset) If @error = 0 Then $nOffset = @extended Else ExitLoop EndIf For $i = 0 To UBound($array) - 1 $str = $array[$i] $str = StringRegExpReplace($str, "&#(.*?);", "") $str = StringRegExpReplace($str, "<(.*?)>", "") $str = StringRegExpReplace($str, "</(.*?)>", "") $str = StringRegExpReplace($str, "&(.*?);", "") GUICtrlSetData($Combo1, "|" & $str) Next WEnd GUICtrlSetState($Edit1, $GUI_SHOW) GUICtrlSetData($Edit1, $str) EndIf $nOffset = 1 $str = "" While 1 $array = StringRegExp($source, '<(?i)li>(.*?)<', 1, $nOffset) If @error = 0 Then $nOffset = @extended Else ExitLoop EndIf For $i = 0 To UBound($array) - 1 $str = $str & $array[$i] & @CRLF & @CRLF $str = StringRegExpReplace($str, "&#(.*?);", "") $str = StringRegExpReplace($str, "<(.*?)>", "") $str = StringRegExpReplace($str, "</(.*?)>", "") $str = StringRegExpReplace($str, "&(.*?);", "") Next WEnd GUICtrlSetState($Edit1, $GUI_SHOW) GUICtrlSetData($Edit1, $str) EndFunc;==>gSearch ;- ////////////// Function: iSearch ////////////////////////////// ;- /////// Purpose: Search my investment site for terms ////////// ;- /////////////////////////////////////////////////////////////// Func iSearch() $source = "" $str = "" $str2 = "" GUICtrlSetState($searchdefs, $GUI_SHOW) GUICtrlSetState($Edit1, $GUI_HIDE) GUICtrlSetState($Terms, $GUI_SHOW) GUICtrlSetState($Defs, $GUI_SHOW) GUICtrlSetData($Terms, "List of Search Terms") GUICtrlSetData($Defs, "Search Term Results") $str = "" $str2 = "" GUICtrlSetState($Combo1, $GUI_HIDE) GUICtrlSetState($comboLable1, $GUI_HIDE) GUICtrlSetState($Progress1, $GUI_SHOW) $item = StringReplace($item2, " ", "+") $source = (_INetGetSource("http://www.mysite.com/ior/results.php?search_text=" & $item)) If StringInStr($source, "Found 0 sites", 0) > "0" Then GUICtrlSetData($Defs, "Term not found, sorry, try doing a Google Search instead!" & @CRLF & @CRLF & "Note: Remember, terms are sensitive to position; for security reasons, 'relative strength' is not the same as 'strength relative'" & @CRLF & @CRLF & "we do this to cut down on the amount of bandwidth and server load that superflous searches cause.") GUICtrlSetState($Progress1, $GUI_HIDE) Else For $i = 0 To 100 GUICtrlSetData($Progress1, $i) Sleep(5) GUICtrlSetData($Progress1, 0) Next GUICtrlSetState($Progress1, $GUI_HIDE) $nOffset = 1 $str = "" While 1 $array = StringRegExp($source, 'id="Title">(.*?)</td>', 1, $nOffset) $array2 = StringRegExp($source, 'id="Def">(.*?)</span>', 1, $nOffset) If @error = 0 Then $nOffset = @extended Else ExitLoop EndIf For $i = 0 To UBound($array) - 1 $str = $str & $array[$i] & @CRLF & @CRLF $str = StringRegExpReplace($str, "&#(.*?);", "") $str = StringRegExpReplace($str, "<(.*?)>", "") $str = StringRegExpReplace($str, "</(.*?)>", "") $str = StringRegExpReplace($str, "&(.*?);", "") $str2 = $str2 & $array2[$i] & @CRLF & @CRLF $str2 = StringRegExpReplace($str2, "&#(.*?);", "") $str2 = StringRegExpReplace($str2, "<(.*?)>", "") $str2 = StringRegExpReplace($str2, "</(.*?)>", "") $str2 = StringRegExpReplace($str2, "&(.*?);", "") Next WEnd GUICtrlSetData($Terms, $str) GUICtrlSetData($Defs, $str2) EndIf EndFunc;==>iSearch ;- ////////////// Function: idSearch() //////////////////////////////// ;- /////// Purpose: Search investment site for defines /////////////// ;- /////////////////////////////////////////////////////////////// Func idSearch() $source = "" $str = "" $str2 = "" GUICtrlSetState($searchdefs, $GUI_SHOW) GUICtrlSetState($Edit1, $GUI_HIDE) GUICtrlSetState($Terms, $GUI_SHOW) GUICtrlSetState($Defs, $GUI_SHOW) GUICtrlSetData($Terms, "List of Search Terms") GUICtrlSetData($Defs, "Search Term Results") $str = "" $str2 = "" GUICtrlSetState($Combo1, $GUI_HIDE) GUICtrlSetState($comboLable1, $GUI_HIDE) GUICtrlSetState($Progress1, $GUI_SHOW) $item = StringReplace($item2, " ", "+") $source = (_INetGetSource("http://mysite.com/ior/resultsdefs.php?search_defs=" & $item)) If StringInStr($source, "Found 0 sites", 0) > "0" Then GUICtrlSetData($Defs, "Term not found, sorry, try doing a Google Search instead!" & @CRLF & @CRLF & "Note: Remember, terms are sensitive to position; for security reasons, 'relative strength' is not the same as 'strength relative'" & @CRLF & @CRLF & "we do this to cut down on the amount of bandwidth and server load that superflous searches cause.") GUICtrlSetState($Progress1, $GUI_HIDE) Else For $i = 0 To 100 GUICtrlSetData($Progress1, $i) Sleep(5) GUICtrlSetData($Progress1, 0) Next GUICtrlSetState($Progress1, $GUI_HIDE) $nOffset = 1 $str = "" While 1 $array = StringRegExp($source, 'id="Title">(.*?)</td>', 1, $nOffset) $array2 = StringRegExp($source, 'id="Def">(.*?)</span>', 1, $nOffset) If @error = 0 Then $nOffset = @extended Else ExitLoop EndIf For $i = 0 To UBound($array) - 1 $str = $str & $array[$i] & @CRLF & @CRLF $str = StringRegExpReplace($str, "&#(.*?);", "") $str = StringRegExpReplace($str, "<(.*?)>", "") $str = StringRegExpReplace($str, "</(.*?)>", "") $str = StringRegExpReplace($str, "&(.*?);", "") $str2 = $str2 & $array2[$i] & @CRLF & @CRLF $str2 = StringRegExpReplace($str2, "&#(.*?);", "") $str2 = StringRegExpReplace($str2, "<(.*?)>", "") $str2 = StringRegExpReplace($str2, "</(.*?)>", "") $str2 = StringRegExpReplace($str2, "&(.*?);", "") Next WEnd GUICtrlSetData($Terms, $str) GUICtrlSetData($Defs, $str2) EndIf EndFunc;==>iSearch ;- ///////////// SHOW GUI /////////////////// $gclicked = 0 $bclicked = 0 $iclicked = 0 $uclicked = 0 GUISetState(@SW_SHOW) #EndRegion ;- //////////// SELECT WHAT TO DO /////////////// While 1 $nMsg = GUIGetMsg() Switch $nMsg ;- Close the GUI Case $GUI_EVENT_CLOSE Exit ;- Search Investment Defs if button is pressed case $searchdefs $item2 = GUICtrlRead($Input1) call("idSearch") ;- Default search option, search google defines Case $Radio1 $sopt = "Search Definitions" guictrlsetstate($GUIActiveXKB, $GUI_hide) guictrlsetstate($kbGOSelect, $GUI_hide) guictrlsetstate($kbSelectdd, $GUI_hide) guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($Input1, $GUI_SHOW) guictrlsetstate($Edit1, $GUI_SHOW) guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_SHOW) guictrlsetstate($GUIActiveX, $GUI_hide) guictrlsetstate($GUI_Button_Back, $GUI_hide) guictrlsetstate($GUI_Button_Forward, $GUI_hide) guictrlsetstate($GUI_Button_Home, $GUI_hide) guictrlsetstate($GUI_Button_Stop, $GUI_hide) ;- Investment search section Case $Radio2 $sopt = "Investment Search" guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($GUIActiveXKB, $GUI_hide) guictrlsetstate($kbGOSelect, $GUI_hide) guictrlsetstate($kbSelectdd, $GUI_hide) guictrlsetstate($Input1, $GUI_SHOW) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($Terms, $GUI_SHOW) guictrlsetstate($Defs, $GUI_SHOW) guictrlsetstate($searchdefs, $GUI_SHOW) guictrlsetstate($searchterms, $GUI_SHOW) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($GUIActiveX, $GUI_hide) guictrlsetstate($GUI_Button_Back, $GUI_hide) guictrlsetstate($GUI_Button_Forward, $GUI_hide) guictrlsetstate($GUI_Button_Home, $GUI_hide) guictrlsetstate($GUI_Button_Stop, $GUI_hide) ;- Google search section Case $Radio3 $sopt = "Google Search" guictrlsetstate($GUIActiveXKB, $GUI_hide) guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($kbGOSelect, $GUI_hide) guictrlsetstate($kbSelectdd, $GUI_hide) guictrlsetstate($Input1, $GUI_SHOW) guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($GUIActiveX, $GUI_SHOW) guictrlsetstate($GUI_Button_Back, $GUI_SHOW) guictrlsetstate($GUI_Button_Forward, $GUI_SHOW) guictrlsetstate($GUI_Button_Home, $GUI_SHOW) guictrlsetstate($GUI_Button_Stop, $GUI_SHOW) guictrlsetstate($GUI_Button_Refresh, $GUI_SHOW) $item2 = guictrlread($Input1, 1) $item = StringReplace($item2, " ", "+") $homeURL = "http://www.google.com/search?hl=en&q="&$item&"&btnG=Google+Search" call("goIE") ;- Open embeded IE to kb website case $Radio4 $sopt = "Open KB" guictrlsetstate($GUIActiveXKB, $GUI_hide) guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($kbGOSelect, $GUI_hide) guictrlsetstate($kbSelectdd, $GUI_hide) guictrlsetstate($Input1, $GUI_HIDE) guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($GUIActiveX, $GUI_SHOW) guictrlsetstate($GUI_Button_Back, $GUI_SHOW) guictrlsetstate($GUI_Button_Forward, $GUI_SHOW) guictrlsetstate($GUI_Button_Home, $GUI_SHOW) guictrlsetstate($GUI_Button_Stop, $GUI_SHOW) guictrlsetstate($GUI_Button_Refresh, $GUI_hide) $homeURL = "http://kb.mysite.com" call("goKB") ;- Open specified website case $Radio5 $sopt = "Open Website" guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($GUIActiveXKB, $GUI_hide) guictrlsetstate($kbGOSelect, $GUI_hide) guictrlsetstate($kbSelectdd, $GUI_hide) guictrlsetstate($Input1, $GUI_HIDE) guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($GUIActiveX, $GUI_SHOW) guictrlsetstate($GUI_Button_Back, $GUI_SHOW) guictrlsetstate($GUI_Button_Forward, $GUI_SHOW) guictrlsetstate($GUI_Button_Home, $GUI_SHOW) guictrlsetstate($GUI_Button_Stop, $GUI_SHOW) guictrlsetstate($GUI_Button_Refresh, $GUI_HIDE) $item2 = InputBox("Open Website", "What website do you wish to goto:", "http://www.google.com") if @error = "1" Then $item2 = "http://www.google.com" elseif @error = "2" Then $item2 = "http://www.google.com" EndIf $item = StringReplace($item2, " ", "+") $homeURL = "prompt" $refreshURL = "prompt" call("goWeb") ;- Open offline KB in minimzied mode case $Radio6 $sopt = "Open OKB" ;~ guictrlsetstate($listview, $GUI_SHOW) guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Input1, $GUI_SHOW) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($KBExpandIN, $GUI_SHOW) guictrlsetstate($kbGOSelect, $GUI_SHOW) guictrlsetstate($kbSelectdd, $GUI_SHOW) guictrlsetstate($GUIActiveX, $GUI_hide) guictrlsetstate($GUIActiveXKB, $GUI_SHOW) guictrlsetstate($GUI_Button_Back, $GUI_SHOW) guictrlsetstate($GUI_Button_Forward, $GUI_SHOW) guictrlsetstate($GUI_Button_Home, $GUI_SHOW) guictrlsetstate($GUI_Button_Stop, $GUI_SHOW) guictrlsetstate($GUI_Button_Refresh, $GUI_HIDE) $fQuery = Guictrlread($Input1, 1) call("goOKB") ;- Expand offline kb to full case $KBExpandIN guictrlsetstate($listview, $GUI_HIDE) guictrlsetstate($listviewMIN, $GUI_SHOW) guictrlsetstate($GUIActiveXKB, $GUI_HIDE) guictrlsetstate($KBExpandIE, $GUI_SHOW) guictrlsetstate($KBExpandIN, $GUI_HIDE) guictrlsetstate($KBExpandOUT, $GUI_show) $fQuery = Guictrlread($Input1, 1) call("goOKB") ;- Get terms into list view case $kbGOSelect $fQuery = Guictrlread($Input1, 1) call("goOKB") ;- IE Button Home pressed Case $GUI_Button_Home if $homeURL = "prompt" Then $homeURL = InputBox("Open Website", "What website do you wish to goto:", "http://www.google.com") if @error = "1" Then $homeURL = "http://www.google.com" elseif @error = "2" Then $homeURL = "http://www.google.com" EndIf _IENavigate ($oIE, $homeURL) Else _IENavigate ($oIE, $homeURL) EndIf ;- IE Button Back pressed Case $GUI_Button_Back _IEAction ($oIE, "back") ;- IE Button Forward pressed Case $GUI_Button_Forward _IEAction ($oIE, "forward") ;- IE Button Stop pressed Case $GUI_Button_Stop _IEAction ($oIE, "stop") ;- IE Button Refresh pressed case $GUI_Button_Refresh $sopt = "Google Search" guictrlsetstate($Terms, $GUI_HIDE) guictrlsetstate($Defs, $GUI_HIDE) guictrlsetstate($searchdefs, $GUI_HIDE) guictrlsetstate($searchterms, $GUI_HIDE) guictrlsetstate($searchgoog, $GUI_HIDE) guictrlsetstate($Edit1, $GUI_HIDE) guictrlsetstate($GUIActiveX, $GUI_SHOW) guictrlsetstate($GUI_Button_Back, $GUI_SHOW) guictrlsetstate($GUI_Button_Forward, $GUI_SHOW) guictrlsetstate($GUI_Button_Home, $GUI_SHOW) guictrlsetstate($GUI_Button_Stop, $GUI_SHOW) guictrlsetstate($GUI_Button_Refresh, $GUI_SHOW) $item2 = guictrlread($Input1, 1) $item = StringReplace($item2, " ", "+") call("goIE") ;- Search Google Section Case $searchgoog $item2 = GUICtrlRead($Input1) If $sopt = "Search Definitions" Then Call("gSearch") ElseIf $sopt = "Investment Search" Then Call("iSearch") Else MsgBox(0, "Error", "Um, I couldn't decide what to do. The value of Search Options is: " & $sopt & @LF) Exit EndIf ;- Search Terms Section Case $searchterms $item2 = GUICtrlRead($Input1) If $sopt = "Search Definitions" Then Call("gSearch") ElseIf $sopt = "Investment Search" Then Call("iSearch") Else MsgBox(0, "Error", "Um, I couldn't decide what to do. The value of Search Options is: " & $sopt & @LF) Exit EndIf ;- What to do for the combo box Case $Combo1 $item2 = GUICtrlRead($Combo1) GUICtrlSetData($Input1, $item2) Call("gSearch") ;- Open btc tools Case $BTCTools $bclicked = $bclicked + 1 if $bclicked > 1 Then $bclicked = 0 GUICtrlSetColor($BTCTools, 0x000000) Else GUICtrlSetColor($BTCTools, 0x009333) EndIf ShellExecute("http://www.mysite.com/home/BDJJ.exe") ;- IE Open google Case $GSearch $gclicked = $gclicked + 1 if $gclicked > 1 Then $gclicked = 0 GUICtrlSetColor($GSearch, 0x000000) Else GUICtrlSetColor($GSearch, 0x009333) EndIf ShellExecute("http://www.google.com") ;- IVP Search Case $IVPSearch $iclicked = $iclicked + 1 if $iclicked > 1 Then $iclicked = 0 GUICtrlSetColor($IVPSearch, 0x000000) Else GUICtrlSetColor($IVPSearch, 0x009333) EndIf ShellExecute("http://www.investopedia.com") ;- IE UDS Search Case $UDS $uclicked = $uclicked + 1 if $uclicked > 1 Then $uclicked = 0 GUICtrlSetColor($UDS, 0x000000) Else GUICtrlSetColor($UDS, 0x009333) EndIf ShellExecute("http://www.urbandictionary.com") ;- Get definitions case $kbSelectdd call("goOKB_GetDef") EndSwitch WEnd Edited March 29, 2008 by zackrspv -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
DjDeep00 Posted March 24, 2008 Share Posted March 24, 2008 @zackrspv...After you hide the listview..you are showing it again in your goOKB() function. Func goOKB() guictrlsetdata($listview, "") guictrlsetstate($kbSelect, $GUI_SHOW) guictrlsetstate($listview, $GUI_SHOW);- /// Show listview if hidden //// ---------> Over here.... Link to comment Share on other sites More sharing options...
zackrspv Posted March 25, 2008 Author Share Posted March 25, 2008 @zackrspv...After you hide the listview..you are showing it again in your goOKB() function. Func goOKB() guictrlsetdata($listview, "") guictrlsetstate($kbSelect, $GUI_SHOW) guictrlsetstate($listview, $GUI_SHOW);- /// Show listview if hidden //// ---------> Over here.... Yeah, i figured that out a few days later lol. There's just so much to keep track of. I should have marked it [solved] Sorry -_-------__--_-_-____---_-_--_-__-__-_ ^^€ñ†®øÞÿ ë×阮§ wï†høµ† ƒë@®, wï†høµ† †ïmë, @ñd wï†høµ† @ †ïmïdï†ÿ ƒø® !ïƒë. €×阮 ñø†, bµ† ïñ§†ë@d wï†hïñ, ñ@ÿ, †h®øµghøµ† †hë 맧ëñ§ë øƒ !ïƒë. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now