Jump to content

ShawnW

Active Members
  • Posts

    192
  • Joined

  • Last visited

ShawnW's Achievements

Prodigy

Prodigy (4/7)

0

Reputation

  1. If try and upload it still shows as '?'. Also, I don't get the same result after opening in Excel 2016. Running on test file and opening in Excel shows the '?' on both the UTF8 and ANSI versions. I tried something simpler and copied the actual hyphen and just added it in string form. It looks correct in the scite editor, and if I output it to the console when running it shows correctly there as well. Yet after Excel writes it to the csv it breaks, and no matter where I open it, or what font I use, it shows as a '?'. It seems the problem is in the way excel makes the csv, I may just do a more complex csv manual creation building on your 1st example. It seems the display problem i had with the hyphen after writing the file without excel was indeed the font problem you refer to. If I can't do it that way though I may just have to fight every OCD bone in my body and add it as the html code ‑ since it is only ever going to be displayed on a webpage that way.
  2. That didn't seem to change the encoding. I did play with it some more though based on this idea. It seems neither that nor writing to the file in that method changed it to UTF8. I did find that if i read it, then open it in overwrite mode it and write it then it changes to UTF8. $str = FileRead(@DesktopDir & "\test.csv") $hFileOpen = FileOpen(@DesktopDir & "\test.csv",130) FileWrite($hFileOpen, $str) FileClose($hFileOpen) But that still leaves the problem of the hyphen.
  3. Thanks for the suggestion. The first problem there is that 0x2014 is the Em Dash that although present in the excel file data, is not what i need when I add the hyphen in that line. I need the shorter dash like on the keyboard except one that is treated as part of the word when wrapping. I'm thinking it is 0x2011 but I cannot get that to display. In researching the dashes I should honestly be using an En Dash (0x2013) for showing a range of numbers, but that breaks in wrapping, and I didn't get to set the requirements for this, I just have to come up with the solution. Secondly, FileWrite on the array does add commas for the csv but that is all it does. It does not add quotes around cells that contain a comma already, and if it did, it wouldn't escape existing quotes either. I didn't have a line like this in my example because I did not consider a different way of creating the csv, but I do have lines that would require a more accurate csv creation.
  4. I have a script that takes a large excel file, pulls out and reorganizes certain information I need, and spits out a trimmed down csv file which I uses to upload the information on my website. Some of this information contains characters with accents or em dashes. By default it would create a csv file in ANSI which I then uploaded but had to tell my website import system it was windows-1252 in order for it to look correct. This was all working fine except now I need to add in a non-breaking space and non-breaking hyphen into parts of my output. At first I tried using ChrW(0xA0) and ChrW(0x2011) as replacements. A quick test in the console looked correct, however opening the csv output in notepad++ showed the space correctly but a ? for the hyphen and the file was still encoded as ANSI. I tried to view it as UTF-8 instead but this just made the space appear as xAO and also other characters appeared that way like my em dashes appeared as x97 and another symbol as xA7 etc. If I instead do a convert to UTF-8 from notepad++ then those problems go away except the hyphen still displays as ?. I then noticed on the page I linked for the non-breaking hyphen it lists the UTF-8 hex as 0xE2 0x80 0x91 (e28091). I was unsure how to enter this in autoit but several things i tried all failed to get the hyphen inserted. I need a way to get both the space and hyphen added correctly as either ANSI or UTF-8, but if it is UTF-8 then I need a way to convert all of the other data I extracted from the excel file. I've included a test excel file with a single line and test script to create a csv demonstrating the problem. test.xlsx test.au3
  5. Ah thanks, scite wasn't running with admin apparently and I wasn't actually building the exe to test. I did have setpassword before but took it out when trying to find where they error was coming from.
  6. I know there are threads out there for creating local accounts with similar steps and I've used them successfully in the past. When it failed now though I stripped it down to what I assume is the minimum without adding properties or passwords, but still fails and I cannot figure out why. $oSys = ObjGet("WinNT://" & @ComputerName) $oUser = $oSys.Create("user", "tester") $oUser.SetInfo It fails when autoit thinks SetInfo is a method of the object.  ==> The requested action with this object has failed.: $oUser.SetInfo $oUser^ ERROR Anyway, I'm using windows 10. Any ideas are appreciated.
  7. So I work at a university and one of the PhD students and a faculty member I support came to me with this problem. I'm giving backstory because the request itself might come off as rather shady, but it is purely for academic interest, among a controlled group of volunteers for dissertation research. They will be giving a large set of students and other volunteers a set of problems to solve, such as researching the best location for a certain type of business in a particular city. Anyway, they want to study how the volunteers go about finding the answers. The want to be able to track the URLs visited, time spent on each page, number of words on page, number of images/videos on page, and list of the meta tags. They are fine with having the volunteers run an exe before starting in order to track the data. The only solution I have thought of so far is to also ask that the volunteers use IE and have autoit use the IE functions to track and parse the required information. I haven't built anything yet, but before I start I would like to get any other ideas that might not restrict it to IE, or even a non-autoit solution so that they don't have to eliminate mac users from the test. I realize this type of tracking is exactly what browsers and security software tries to prevent and told them as much, if necessary we can force users to take the tests in our lab where we have complete control but this would limit the scope of the test significantly.
  8. Well looks like I stumbled on a need for this a year to late since the original poster seems to not be around anymore but I just want to say Awesome Work!!! Some improvements that are needed from what I have seen so far, and I may have to write them myself for what I need are... Make _ClosePDFFile() clear the buffers so that resources from one pdf do not get loaded into subsequent pdfs and cause larger and larger files the more you create. Since all the stuff gets written at the end, and since order maters as seen in >#224, why not keep a separate buffer for resources that you can put in order later when writing. That way you can loop through some data and dynamically load and insert images within a page, rather than loop to load, then start the page and loop again to insert. Other notes that are just me being picky take udf out of the name, no other udf has udf in the name. Start the function names with a common identifier like _MPDFDrawLine, _MPDFPath,... So users can easily know what the function is referencing.
  9. Nice idea but if the user is running something like a browser page that updates itself, or gets a new email which is cashed in outlooks ost file, or any number of other things that could write to a file while the user is not there, this might throw it off. Plus I've never really trusted windows folder time stamps. To many times I've navigated into a folder noting its "last modified" date, only to find a sub folder with a "last modified" date later than the parent folder.
  10. You'd think right? But apparently I'm supposed to be proactive in supporting idiots. I'm at a university and support faculty, staff, and phd students. Faculty bring in the money with grants and students and such, so we gotta bend over backwards to cater to them, unfortunately they seem to be the most stubborn, hard to work with, and technically challenged group of individuals.
  11. I have AD admin permissions to the computers I support. I'm trying to write a simple script that will give me a popup when a someone is active at a specific computer. I've been playing email tag with a certain user that needs help and needs to be there when I come assist. We keep missing each other so I figure something that lets me know the second they do something at their computer would be helpful. The user stays logged so I cannot just look for that, and they also do not always lock their computer (gonna have to talk with them about that) so I cannot check for that either. Is there anything else I can look for remotely that might help?
  12. So the normal way of resizing a gui control along with your window is to use GUICtrlSetResizing() which requires the controlID. Since _GUICtrlListView_Create() only returns the handle, and I could not find a way to look up a controlID based on that, I used AU3Info to determine that my listview seems to always have an ID of 10000. Using this though I am still unable to get the listview created with the UDF method to resize along with the window. Can someone help?
  13. Umm so if you are able to click the button, would the window not already be on top?
  14. Upon thinking on this further you might be able to write your own script to get a similar effect. Not sure if this will work for everything but if all your concerned about is file and folders located on the c:\ drive then you could do something like this. $current_clip = ClipGet() While True Sleep(100) If Not (ClipGet() == $current_clip) Then If StringLeft(ClipGet(),3) = "C:\" Then ClipPut($current_clip) Else $current_clip = ClipGet() EndIf EndIf WEnd Basically this constantly checks your clipboard to see if the data there is a path on the c:\ drive. If it is then it replaces it with whatever was in the clip previously. This still won't stop you from copying the data off from a networked computer with the proper permissions. I might ask though what purpose might something like this serve?
  15. 1st this post is from 2006 and the functions used no longer exist. AdlibRegister and AdlibUnregister are what would be required. 2nd no, the clip is always global.
×
×
  • Create New...