
dash007
Active Members-
Posts
77 -
Joined
-
Last visited
dash007's Achievements

Wayfarer (2/7)
0
Reputation
-
Copying columns from one Excel doc to another doc
dash007 replied to dash007's topic in AutoIt General Help and Support
Realised my mistake, I was trying to enter A1 without inverted commas. With "A1", it works. Woot Woot! -
Hi all, Just started to use the ExcelCOM_UDF.au3 and found it to be a great but also a bit complex. Thought i might ask ideas as to how I might be able to automate my task using this include. I have an excel document that has about 25 columns and about 300 rows. What I need (as an example) is to copy column 5 from Book1.xls to column 1 of Book2.xls and then Column 3 from Book1.xls to Column2 of Book2.xls and so on and then save the new excel as a new file. Please note this is just an example. I started trying to use : _ExcelCopy($oBook, $sRangeOrRowStart, $iColStart = 1, $iRowEnd = 1, $iColEnd = 1) However I don't know how to specify "$sRangeOrRowStart". I looked at the include and found that $sRangeOrRowStart - Either an A1 range, or an integer row number to start from if using R1C1 but can find any example of it in action. Can someone point me in the right direction please. Thanks.
-
Centre the title of the dialog box
dash007 replied to dash007's topic in AutoIt GUI Help and Support
Thanks... -
I have a gui, and am trying to centre its title. See sample code (from help file): #include <GUIConstants.au3> GUICreate("My Title") GUISetState (@SW_SHOW) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend In the above code, I would like "My Title" to be in the centre and not at the left (default) of the title bar. I checked the help file and also the forum, and hence requesting if anyone knows how to do it. BTW I have tried something like GUICreate(" My Title") and although it works on my PC it looks really bad on another PC with a different or no theme. Any help would be appreciated.
-
Regdelete issue using RegEnumVal
dash007 replied to dash007's topic in AutoIt General Help and Support
Thanks for the suggestion Volly, Here is a version of above code modified with getting the return value of the Reddelete (noticed I made some errors in earlier code). Unfortunately the return code is '0' and this means the Key/Value does not exist. However the Name key definitely exists as I can see it via regedit and I have it refreshed too. Moreover when running this line on its own, it works fine: RegDelete("HKEY_CURRENT_USER\Software\metapad", "mru_8") $SearchKey = "HKEY_CURRENT_USER\Software\metapad" $SearchString = "mru_8" _RegSearch($SearchKey, $SearchString) Func _RegSearch($SearchKey, $SearchString) Local $v, $val, $found = "" $v = 1 While 1 $val = RegEnumVal($SearchKey, $v) If @error = 0 Then If StringInStr($val, $SearchString) Then MsgBox(64, "Going to delete(1): ", '"' & $SearchKey & '"' & ',' & '"' & $val & '"') $a = RegDelete('"' & $SearchKey & '"' & ',' & '"' & $val & '"') MsgBox(64, "Return Value", $a) MsgBox(64, "Going to delete(2): ", $SearchKey & ',' & $val) $b = RegDelete($SearchKey & ',' & $val) MsgBox(64, "Return Value", $b) EndIf $v += 1 Else ; No more values here ExitLoop EndIf WEnd EndFunc -
Hi, I am searching for a string in a predefined regkey and once found (one or more instance), I am trying to get it deleted but having no success in deleting the key(s). The script I am using is from the below link. Recursive Registry Search Help Trimmed code is (original code thanks to PSaltyDS): $SearchKey = "HKEY_CURRENT_USER\Software\metapad" $SearchString = "mru" $Results = _RegSearch($SearchKey, $SearchString) MsgBox(64, "Results", "ClassGUID for " & $SearchString & " is: " & $Results) RegDelete($SearchKey & "\" & $Results) Func _RegSearch($startkey, $searchval) Local $v, $val, $k, $key, $found = "" $v = 1 While 1 $val = RegEnumVal($startkey, $v) If @error = 0 Then If StringInStr($val, $searchval) Then $found = $found & $startkey & "\" & $val & @LF ;RegDelete($SearchKey & "\" & $val) EndIf $readval = RegRead($startkey, $val) If StringInStr($readval, $searchval) Then $found = $found & $startkey & "\" & $val & " = " & $readval & @LF EndIf $v += 1 Else ; No more values here ExitLoop EndIf WEnd Return $found EndFunc ;==>_RegSearch I have also tried RegDelete($SearchKey & ',' & '"' & $val & '"') but doesn't work. (I believe above, assuming my string is mru_8, translates to: RegDelete("HKEY_CURRENT_USER\Software\metapad", "mru_8") However if you run this line on its own, it works fine: RegDelete("HKEY_CURRENT_USER\Software\metapad", "mru_8") What am I doing wrong? Can someone point me in the right direction please?
-
Clear Autocomplete Strings in IE
dash007 replied to dash007's topic in AutoIt General Help and Support
Have you tried this? It doesn't work, even though I am the administrator of the PC (ie having sufficient rights). There are external tools as I mentioned that let you view the strings and they all mention that its in the Protected Storage. Howeverwhen you navigate to it in regedit, there is nothing there just a user subkey starting with S-1-5...... Thanks anyway for trying to help, unfortunately this was what I too tried first. I have read that one cannot delete the key without changing permissions first on this key (see:http://support.microsoft.com/kb/290684 and very importantly it says for Win2k & XP "Important:Do not remove the main Protected Storage System Provider key. This key is not automatically regenerated. " External utilities seem to have no problems in displaying the strings or deleting strings via their interface, but as I mentioned earlier, these external tools get picked up by Antitrojans and Antivirus software. One last option is to use control send, but thats the last choice. Any other suggestions? -
Hi, Whats the best option to delete autocomplete in IE? I understand the strings are stored in the Protected Storage: HKEY_CURRENT_USER\Software\Microsoft\Protected Storage System Provider When I run an external tool (from Nirsoft), it shows me the strings and I can delete it using that utility. My preference is to use only autoit, plus the fact that some external tools get picked up by Antivirus software. Obviously I am not interested in the passwords stored there, I simply want the history items deleted. Suggestions anyone? Perhaps someone knows a vb script that can be converted to Autoit?
-
Hi randallc, My BARTPE has XP SP2. Its almost like a replica of my desktop PC, but I am afraid it does not pull that particular registry setting or system file that would prevent the error from happening. Everything else works fine on my BARTPE, so I am led to believe that some extra VB runtime file or whatever its called (not normally needed in the smooth functioning of XP) is needed to prevent this error and hence I was asking if you knew. I mean various VB apps that I tested work fine in my BARTPE environment along with all Autoit codes etc. I guess if noone has an answer to this/ or if noone has come across such an issue, I guess I will have to keep this in my 'list of things to do' and move on for the time being But thanks again for your suggestion....
-
Hi randallc, I've been using your include file in many of my scripts. As mentioned to you earlier, I am very impressed with it. Yesterday I tried to add one of my compiled script to my BARTPE cd. But I got an error "Error: Variable must be of type "Object"". So then I tried to compile one of your "sort" codes (taken from your example in the first page) and I get the same error for that too. Below is the precise error: $vbs = ObjCreate("ScriptControl") $vbs.language="vbscript" $vbs^ERROR Error: Variable must be of type "Object". All your scripts work fine on my regular PC where XP Home is installed. I only have a problem when running on my BartPE CD. On my BARTPE cd, I have VB5 and VB6 plugins installed as well as WMI and WSH. I have sample scripts of these types and can confirm that the sample types eg test.vbs, test.wsf etc work fine. Is there a certain VB file required, that I must have in my BARTPE build to avoid this error. Would love to use this Autoitscript on my BARTPE. Perhaps you can tell me if something in the script needs to be modified for wider usability. Thanks in advance.
-
ListView sorting and Index column
dash007 replied to dash007's topic in AutoIt General Help and Support
Hi randallc, Thanks for helping out. In response to your question, yes I do want the index column, however I think that after sorting, it doesn't look good, thats why I was looking to sort it. Bytheway I have implemented your _GUICtrlListView.au3 replacing the default GuiListView.au3 and am very impressed with it. Undoubtedly faster in sorting and with the bonus that it doesn't have a limitation of entries in the ListView. Keep it up! -
Please ignore this, as this topic is a duplicate. Error about floodcontrol when I was posting resulted in duplicate topics. Sorry. See http://www.autoitscript.com/forum/index.ph...topic=27837&hl= instead
-
Hi all, Below code is an example (borrowed from randallc and slightly modified). What I would like is to sort all columns except the index column. Currently when you try sorting, all the columns get sorted which is fine but looks ugly if you have one of the columns simply being an "index" column. Below is the code: #include <GuiConstants.au3> #include <GuiListView.au3> $searchGUI = GUICreate("ListView Sort", 810, 623, (@DesktopWidth - 800) / 2, (@DesktopHeight - 600) / 2,$WS_MAXIMIZEBOX + $WS_MINIMIZEBOX) $listview = GUICtrlCreateListView("Index|Student|Marks", 10, 10, 790, 530, -1, BitOR($LVS_EX_REGIONAL, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES)) for $i=1 to 40 $s_RandomListItem=$i &"|"&Random(-10000, 10000, 1)&"|more_"&Chr(Random(Asc("a"), Asc("z"), 1))&Chr(Random(Asc("a"), Asc("z"), 1))&String(Random(-10000, 10000, 1)) GUICtrlCreateListViewItem($s_RandomListItem, $listview) next _GUICtrlListViewSetColumnWidth ($listview, 0, 100) _GUICtrlListViewSetColumnWidth ($listview, 1, 200) _GUICtrlListViewSetColumnWidth ($listview, 2, 100) GUISetState() Dim $B_DESCENDING[_GUICtrlListViewGetSubItemsCount ($listview) ] While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $listview ; sort the list by the column header clicked on _GUICtrlListViewSort($listview, $B_DESCENDING, GUICtrlGetState($listview)) EndSelect WEnd Exit My suggestion was to re-sort just the "index" column after the regular sorting has completed. For example: _GUICtrlListViewSort($listview, $B_DESCENDING, GUICtrlGetState($listview)) For $i=1 to 40 GUICtrlCreateListViewItem($i & "|" & "" & "|" & "", $listview) Next This obviously doesn't work. I thought another idea: _GUICtrlListViewSort($listview, $B_DESCENDING, "all columns but index column") But I don't know the right syntax for this idea. I have searched the forums and haven't seen any requests of this nature. Does anyone know how to do it? Any help is appreciated Cheers
-
SmOke_N, Having the beta installed in the beta folder as you suggested, I am able to successfully create an encoded script, ie no error about duplicate function! To do this, I created a beta folder inside the Autoit3 folder and dragged everything into this newly created beta folder. However I was unable to run the scripts because my scripts rightly complained about missing includes. I next installed the stable version to the default location. However my scripts complained about unknown functions (I expected this). To avoid this, either I had to correct the path to the "beta includes" in my scripts or the easier way was to have the beta in the Autoit3 folder and a copy of the beta in the "Beta" subfolder. My script works and EncodeIt works on the tested scripts too. So I guess we have narrowed down the problem eh? Hopefully... Let me know if you need me to check anything else. One other suggestion is can you have the EncodeIT splash to stay on top? It doesn't have a taskbar so the only way is to minimise all my windows one by one to know the progress. Cheers!
-
SmOke_N, I installed Autoit beta using the zip. I don't have the stable version installed and also don't use ScITe. My Autoit beta is in the location: C:\Program Files\Autoit3. Every time there is a beta update, I replace existing files with the newer files found in the zip archive. All my scripts work fine so far. Hope this info is useful too.... @Bâshrat the Sneaky, What SmOke_N is saying is that in the main page, he has mentioned that if you have any errors on using Encodeit, then you can paste your original script in this forum so that he can test it and not the 'obfuscate' code. SmOke_N also has given an option that you can PM him if you don't prefer to paste the script on this website. You see the below text in Burgundy colour in the main page that SmOke_N was referring to: http://www.autoitscript.com/forum/index.php?act=Attach&type=post&id=6417 ".....If you have an issue with something that is turning out Poor Results or Errors, Please don't post it unless you have a reproduced script that I can test what is causing the problem. And an obfuscated post is futile, so If you can't post your main script, than you can PM me with it with a description of what is supposed to turn out, so I can test the Obfuscator on it personally......"