-
Posts
116 -
Joined
-
Last visited
About RichE
- Birthday 06/25/1972
Profile Information
-
Location
Newcastle, UK
-
WWW
http://www.sellostring.co.uk
RichE's Achievements

Adventurer (3/7)
0
Reputation
-
all sorted, thanks again guys
-
Thanks guys
-
Hi All, I wrote an app a few years ago and have revisited it to improve it, one thing I can't sort it to not show it on the taskbar, but show it in the system tray, the point of the app is to allow users easy access to info that tech support may ask, like username, pc name & IP address. I've searched the forums but not found a answer, can anyone point me in the right direction. Thanks in advance# RichE
-
Thanks guys, there was whitespace at the end, it's working now
-
but I'm still a bit confused as to why the inbuilt function works further up the script, but then doesn't work further down the script what I've found is if I put the select folder directly into the script it works, but if I guictrlread it in it does not, yet it msgbox's correctly out ??? $sname = Guictrlread($sys_list) msgbox(64, "" , $sname) $hSearch = FileFindFirstFile($data & "" & $sname & "*.ini")
-
No it doesn't interact with the program it's for me to use as a sort of memo pad to keep info of where I've been. It not a game bot and i understand the forum rules, and hopefully this does not infringe them
-
I'm writing an app to store info for elite dangerous on systems I visit and what to trade their and it's facilities, the data will sit in this structure: Data - System1 - Station1.ini Station2.ini System2 - Station1.ini Station2.ini etc etc my problem is, on initial run the data folder is created (as it should), then I populate data with said systems (which it does), and create stations (which it does), but on the search tab, when I click on a system from the list, it won't read the files in that folder for some reason, I've tested it reading from the top level and it populates. anyone got any ideas why it won't read the ini files into the combo control on the search page..? Code #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.12.0 Author: myName Script Function: Elite Dangerous - Navigators Yoeman. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> #include <WindowsConstants.au3> #include <MsgBoxConstants.au3> #include <TreeViewConstants.au3> ;declare variables $data = @ScriptDir & "\data" ;check for data dir existance, if not create it if fileexists($data) Then Else dircreate($data) EndIf #Region ### START Koda GUI section ### Form= $NYMain = GUICreate("Navigators Yeoman", 919, 559, 203, 107) $Tab1 = GUICtrlCreateTab(8, 8, 905, 505) $TabSearch = GUICtrlCreateTabItem("Search") GUICtrlSetState(-1,$GUI_SHOW) $sys_list = GUICtrlCreateList("", 16, 50 , 200, 450) $station_list = GUICtrlCreateCombo("", 220, 50, 450, 25) $TabStation = GUICtrlCreateTabItem("Add Station") $Stn_submit = GUICtrlCreateButton("Submit", 809, 476, 97, 33) GUICtrlSetColor(-1, 0x0000C0) $Sys_Select = GUICtrlCreateCombo("Select System", 16, 56, 889, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Stn_Name = GUICtrlCreateInput("Station Name", 16, 88, 449, 21) $Facilities = GUICtrlCreateGroup(" Facilities ", 16, 120, 457, 385) $cx_Repairs = GUICtrlCreateCheckbox("Repairs", 24, 138, 97, 17) $cx_Contacts = GUICtrlCreateCheckbox("Contacts", 24, 168, 97, 17) $cx_Munitions = GUICtrlCreateCheckbox("Munitions", 24, 188, 97, 17) $cx_BMarket = GUICtrlCreateCheckbox("Black Market", 24, 208, 97, 17) $cx_Outfitters = GUICtrlCreateCheckbox("Outfitters", 24, 228, 97, 17) $cx_Shipyard = GUICtrlCreateCheckbox("ShipYard", 24, 248, 97, 17) $cx_cartographer = GUICtrlCreateCheckbox("Cartographer", 24, 268, 97, 17) $cx_largepad = GUICtrlCreateCheckbox("Large Pad", 24, 288, 97, 17) $cx_mediumpad = GUICtrlCreateCheckbox("Medium Pad", 24, 310, 97, 17) $cx_Smallpad = GUICtrlCreateCheckbox("Small Pad", 24, 330, 97, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Comments = GUICtrlCreateEdit("", 480, 88, 425, 385) GUICtrlCreateTabItem("") $Add_sys = GUICtrlCreateButton("Add System", 8, 520, 129, 33) Local $hSearch = FileFindFirstFile($data & "\*") ; Check if the search was successful, if not display a message and return False. If $hSearch = -1 Then MsgBox($MB_SYSTEMMODAL, "", "Error: No files/directories matched the search pattern.") EndIf ; Assign a Local variable the empty string which will contain the files names found. Local $sFileName = "", $iResult = 0 GUICtrlSetColor(-1, 0x0000C0) While 1 $sFileName = FileFindNextFile($hSearch) ; If there is no more file matching the search. If @error Then ExitLoop ; Display the file name. $iResult = guictrlsetdata($sys_list, $sFileName & @CR) $iResult = guictrlsetdata($Sys_Select, $sFileName) WEnd ; Close the search handle. FileClose($hSearch) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Add_sys $SN = InputBox("Add new system", "System Name") if $SN = "" or fileexists($data & "\" & $sn) then Msgbox(48,"Navigators Yeoman", "System already exists or there was an error!", 5) Else dircreate($data & "\" & $sn) msgbox(64,"Navigators Yeoman", "System Created", 5) guictrlsetdata($sys_list, $sn, $sys_list) guictrlsetdata($Sys_Select, $sn, $Sys_Select) EndIf Case $Stn_submit $sysname = guictrlread($Sys_Select) $stnname = guictrlread($Stn_Name) $Stn_coms = Guictrlread($comments) $f_Repairs = Guictrlread($cx_Repairs) $f_Contacts = Guictrlread($cx_Contacts) $f_Munitions = Guictrlread($cx_Munitions) $f_BMarket = Guictrlread($cx_BMarket) $f_Outfitters = Guictrlread($cx_Outfitters) $f_Shipyard = Guictrlread($cx_Shipyard) $f_Cartographer = Guictrlread($cx_cartographer) $f_Lpad = Guictrlread($cx_largepad) $f_Mpad = Guictrlread($cx_mediumpad) $f_Spad = Guictrlread($cx_Smallpad) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Station-Details", "Name", $stnname) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Repairs", $f_Repairs) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Contacts", $f_Contacts) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Munitions", $f_Munitions) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Bmarket", $f_BMarket) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Outfitters", $f_Outfitters) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Shipyard", $f_Shipyard) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Cartographers", $f_Cartographer) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Lpad", $f_Lpad) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "Mpad", $f_Mpad) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Facilities", "spad", $f_Spad) IniWrite($data & "\" & $sysname & "\" & $stnname &".ini", "Comments", "Comments", $Stn_coms) Case $sys_list $Sys_sel = Guictrlread($sys_list) msgbox(64,"", $Sys_sel) $nSearch = FileFindFirstFile(@ScriptDir & "\data\" & $sys_sel & "\*.ini") ; Check if the search was successful, if not display a message. If $nSearch = -1 Then MsgBox($MB_SYSTEMMODAL, "Navigators Yeoman", "Error: No Stations Found") EndIf ; Assign a Local variable the empty string which will contain the files names found. Local $nName = "", $nResult = 0 While 1 $nName = FileFindNextFile($nSearch) ; If there is no more file matching the search. If @error Then ExitLoop ; Display the file name. $nResult = GUICtrlsetdata($station_list, StringLeft($nName, stringlen($nName)-4)) WEnd ; Close the search handle. FileClose($nSearch) EndSwitch WEnd regards Rich
-
I recompiled the inno setup container, as I forgot to include the image file... DOH!
-
If your like me and you have shown people windows 8 & 8.1 only to be asked "So how do you shut it down..?", I got sick of telling (and trying to get them to move the cursor to the bottom right corning, click the cog, then power and then shutdown, so i wrote a simple little app that can sit on the desktop and/or the win8 tiles menu, and it just gives a similar shutdown box to the like of WinXP, with a combo of options. Screenshots Anyway I'd thought I'd share it with everyone http://www.sellostring.com/gs/index.php?id=windows-shutdown-with-options regards Rich
-
Ok I've revised the code a little, but I've still getting duplicates... #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <ProgressConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #include <AD.au3> $ADToolbox = GUICreate("ADToolbox", 1245, 789, 192, 124) $Root = GUICtrlCreateTreeView(8, 8, 241, 769, BitOR($GUI_SS_DEFAULT_TREEVIEW,$WS_BORDER)) $Itemspane = GUICtrlCreateListView("", 256, 8, 801, 681) $taskprog = GUICtrlCreateProgress(256, 696, 801, 25, BitOR($PBS_SMOOTH,$PBS_MARQUEE,$WS_BORDER)) GUISetState(@SW_SHOW) _AD_Open() Global $aOUs = _AD_GetAllOUs("OU=Computers,OU=Managed,DC=SCHOOL,DC=LOCAL", "", 0) If @error > 0 Then MsgBox(48, "Active Directory Functions", "No OUs could be found") Else dim $iCount, $branch, $branchname, $x, $l, $leafname $iCount = 3 Do $sOU = StringReplace($aOUs[$iCount - 1][0], "\", ",OU=") & "," & $sAD_DNSDomain $branch = StringSplit($sOU, ",") if $branch[0] > 4 and $branch[5] <> "DC=SCHOOL" and $branch[5] <> "DC=LOCAL" then $branchname = GUICtrlCreateTreeViewItem($branch[5], $root) for $x = 6 to $branch[0] IF $branch[$X] <> "DC=SCHOOL" and $branch[$x] <> "DC=LOCAL" Then $leafname = GUICtrlCreateTreeViewItem($branch[$x], $branchname) EndIf Next EndIf $iCount=$iCount+1 until $iCount = $aOUs[0][0] EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd any ideas
-
Hi Guys/Gals, I'm using the AD UDF to interogate our AD (the computers section, which we have under an OU of managed), what I'm trying to do (and failing horribly) is recurse through the sub OU's and place them inside a treeview container. e.g Access | |-Teachers |- Students |-Office but I can't get it to go past the first sub OU, and it's creating duplicates... my code is below #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <ProgressConstants.au3> #include <TreeViewConstants.au3> #include <WindowsConstants.au3> #include <AD.au3> $ADToolbox = GUICreate("ADToolbox", 1245, 789, 192, 124) $Root = GUICtrlCreateTreeView(8, 8, 241, 769, BitOR($GUI_SS_DEFAULT_TREEVIEW,$WS_BORDER)) $Itemspane = GUICtrlCreateListView("", 256, 8, 801, 681) $taskprog = GUICtrlCreateProgress(256, 696, 801, 25, BitOR($PBS_SMOOTH,$PBS_MARQUEE,$WS_BORDER)) GUISetState(@SW_SHOW) _AD_Open() Global $aOUs = _AD_GetAllOUs("OU=Computers,OU=Managed,DC=SCHOOL,DC=LOCAL", "", 0) If @error > 0 Then MsgBox(48, "Active Directory Functions", "No OUs could be found") Else $iCount = 2 Do $sOU = "ou=" & StringReplace($aOUs[$iCount - 1][0], "\", ",ou=") & "," & $sAD_DNSDomain $trunk = stringsplit($sOU, ",") if $trunk[0] > 4 Then $leafcount = 0 $branchno = 0 do if $branchno = 0 then if $trunk[5] <> "DC=Local" and $trunk[5] <> "DC=SCHOOL" then $branch = GUICtrlCreateTreeViewItem($trunk[5], $root) $branchno = 1 $leafcount = $leafcount + 1 else $leafcount = $leafcount + 1 EndIf Else $count = 0 $leafname = 0 do if $leafname = 0 Then if $trunk[6] <> "DC=Local" and $trunk[6] <> "DC=SCHOOL" then $leaf = GUICtrlCreateTreeViewItem($trunk[6], $Branch) $leafname = 1 $count = $count + 1 else $count = $count + 1 $leafname = 0 EndIf endif until $count = $trunk[0] $leafname=0 $branchno = 0 $count = 0 EndIf until $leafcount = $trunk[0] $leafcount = 0 $branchno = 0 EndIf $iCount=$iCount+1 until $iCount = $aOUs[0][0] EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd thanks in advance RichE
-
my app was working but stopped...?
RichE replied to RichE's topic in AutoIt General Help and Support
Your a star !, sorted and working like a treat, now I just need to stop it from being closed on the taskbar right click -
my app was working but stopped...?
RichE replied to RichE's topic in AutoIt General Help and Support
So the story so far, the app works... on my pc and on a work mates, (we're both domain admins), but when I login on another "test" PC with my domain admin account and run it I get this: Line 861 (file...blah) Error: Variable used without being declared. I've checked that I've declared ALL my variables, and I'm now completely stumped... anyone got any ideas..? regards Rich -
my app was working but stopped...?
RichE replied to RichE's topic in AutoIt General Help and Support
it's ok I found the problem, it wasn't the autoit app, it was my PC and the fact that I'd rebooted it and it hadn't remapped my home dir ... DOH!, so i'm currently looking at GPO's as to why it isn't @mihaibr thx I'll put that in thanks for the help regards Rich -
Afternoon All, I have a weird problem, my app script that I wrote was working but now isn't and throws an error : Line 796 (blah...) Error Subscript used with non-array variable. the compile didn't pick it up and i've checked through and can't see anything obvious. can someone check it over, just to prove I'm not going mad... #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=icopeople.ico #AutoIt3Wrapper_Outfile=USRinFO.exe #AutoIt3Wrapper_Res_Description=Display user info #AutoIt3Wrapper_Res_Fileversion=1.0.0.7 #AutoIt3Wrapper_Res_Fileversion_AutoIncrement=p #AutoIt3Wrapper_Res_LegalCopyright=Richard Easton #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: Richard Easton Script Function: USER inFO. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> dim $h, $w, $usr, $hd, $hp, $hs, $cn, $os, $ld, $ls, $regvar, $USRinFO, $dirsize, $gmail, $gcal, $gdrv, $gsch, $mininmize, $homedir ;desktop metrics $h = @DesktopHeight - 500 $w = @DesktopWidth - 300 ;usr details $usr = @UserName $hd = @HomeDrive $hp = @HomePath $hs = @HomeShare ;local info $cn = @ComputerName $os = @OSArch ;network info $ld = @LogonDomain $ls = @LogonServer $regvar = Regread("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun", "USRinFO") if $regvar = @error Then regwrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun", "USRinFO", "REG_SZ", '"' & @Scriptdir & 'USRinFO.exe"') EndIf opt("MustDeclareVars", 0) Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown. Opt("TrayOnEventMode", 1) ; TrayCreateItem("Display") TrayItemSetOnEvent(-1, "Show") TrayCreateItem("") TrayCreateItem("About") TrayItemSetOnEvent(-1, "about") ;gui $USRinFO = GUICreate("USRinFO: " & $usr, 260, 450, $w, $h, $WS_EX_TOPMOST) GUICtrlCreateGroup(" User Details ", 8, 8, 240, 120) ;users logon name GUICtrlCreateLabel("Username:", 16, 30, 55, 17) GUICtrlCreateLabel($usr, 80, 30, 100, 17) ;computer name GUICtrlCreateLabel("PC Name:", 16, 48, 60, 17) GUICtrlCreateLabel($cn, 80, 48, 100, 17) ;path to user home directory GUICtrlCreateLabel("HomeDrive:", 16, 66, 60, 17) GUICtrlCreateLabel($hd, 80, 66, 200, 17) GUICtrlCreateLabel("Homepath:", 16, 84, 60, 17) GUICtrlCreateLabel(StringMid($hp & $hs, 2), 80, 84, 200, 17) $dirsize = DirGetSize($hd, 1) if isarray($dirsize) Then If $dirsize[0] > 1000000000 Then $p = $dirsize[0] / 1024 / 1024 / 1024 GUICtrlCreateLabel("Size used:", 16, 104, 60, 17) GUICtrlCreateLabel(Round($p, 2) & " GB", 80, 104, 100, 17) Else $p = ($dirsize[0] / 1024 / 1024) GUICtrlCreateLabel("Size used:", 16, 104, 60, 17) GUICtrlCreateLabel(Round($p, 2) & " MB", 80, 104, 100, 17) EndIf EndIf GUICtrlCreateGroup("", -99, -99, 1, 1) GUICtrlCreateGroup(" Network Details ", 8, 150, 240, 90) ;logon domain GUICtrlCreateLabel("Domain:", 16, 172, 60, 17) GUICtrlCreateLabel($ld, 80, 172, 100, 17) ;logon server GUICtrlCreateLabel("Server:", 16, 190, 60, 17) GUICtrlCreateLabel($ls, 80, 190, 100, 17) ;endgroup GUICtrlCreateGroup("", -99, -99, 1, 1) ;Google controls GUICtrlCreateGroup(" Google Apps ", 8, 300, 240, 65) $gmail = GUICtrlCreateButton("gmail", 16, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($gmail, @ScriptDir & "g-mail.ico", 1) $gcal = GUICtrlCreateButton("gcal", 53, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($gcal, @ScriptDir & "gcal.ico", 1) $gdrv = GUICtrlCreateButton("gdrive", 90, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($gdrv, @ScriptDir & "drive.ico", 1) $gsch = GUICtrlCreateButton("gsearch", 127, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($gsch, @ScriptDir & "gsearch.ico", 1) If $os = "x86" Then If FileExists("C:Program FilesSIMSSIMS .netPulsar.exe") Then $sims = GUICtrlCreateButton("SIMS", 164, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($sims, @ScriptDir & "sims.ico", 1) EndIf ElseIf $os = "x64" Then If FileExists("C:Program Files (x86)SIMSSIMS .netPulsar.exe") Then $sims = GUICtrlCreateButton("SIMS", 164, 320, 36, 36, $BS_ICON + $BS_FLAT) GUICtrlSetImage($sims, @ScriptDir & "sims.ico", 1) EndIf EndIf GUICtrlCreateGroup("", -99, -99, 1, 1) ;button controls $mininmize = GUICtrlCreateButton("Minimize", 8, 380, 80, 30) $homedir = GUICtrlCreateButton("Home Dir", 90, 380, 80, 30) GUISetState(@SW_SHOWMINIMIZED) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $mininmize GUISetState(@SW_MINIMIZE, $USRinFO) Case $homedir Run("explorer.exe " & $hd, @SystemDir) Case $gmail If @OSArch = "X64" Then Run("C:\Program Files (x86)\Internet Explorer\iexplore.exe https://mail.google.com/mail/?tab=mm&authuser=0", "") Else Run("C:\Program Files\Internet Explorer\iexplore.exe https://mail.google.com/mail/?tab=mm&authuser=0", "") EndIf Case $gcal If @OSArch = "X64" Then Run("C:\Program Files (x86)\Internet Explorer\iexplore.exe https://www.google.com/calendar?tab=mc&authuser=0", "") Else Run("C:\Program Files\Internet Explorer\iexplore.exe https://www.google.com/calendar?tab=mc&authuser=0", "") EndIf Case $gdrv If @OSArch = "X64" Then Run("C:\Program Files (x86)\Internet Explorer\iexplore.exe https://drive.google.com/?tab=mo&authuser=0", "") Else Run("C:\Program Files\Internet Explorer\iexplore.exe https://drive.google.com/?tab=mo&authuser=0", "") EndIf Case $gsch If @OSArch = "X64" Then Run("C:\Program Files (x86)\Internet Explorer\iexplore.exe http://www.google.com/webhp?hl=en&tab=mw&authuser=0", "") Else Run("C:\Program Files\Internet Explorer\iexplore.exe http://www.google.com/webhp?hl=en&tab=mw&authuser=0", "") EndIf Case $sims If $os = "x86" Then Run("C:Program FilesSIMSSIMS .netPulsar.exe", "") ElseIf $os = "x64" Then Run("C:Program Files (x86)SIMSSIMS .netPulsar.exe", "") EndIf EndSwitch WEnd Func show() GUISetState(@SW_RESTORE, $USRinFO) EndFunc ;==>show Func about() MsgBox(64, "USRinFo", "USRinFo" & @CR & "Version: " & FileGetVersion("USRinFO.exe") & @CR & @CR & "Created By Richard Easton 2012") EndFunc ;==>about Edit: Code updated