Jump to content

ivan

Active Members
  • Posts

    399
  • Joined

  • Last visited

Everything posted by ivan

  1. $original = "130102.123456" $diff = "0.000001" $expected_result = "130102.123455" consolewrite((($original - $diff) == $expected_result) & @CRLF) consolewrite(($original - $diff) & @CRLF) consolewrite($expected_result & @CRLF) Try ==.
  2. For tutorials, check this out: http://www.tutorialspoint.com/sqlite/index.htm If you are planning on having multiple users accessing the database simultaneously (concurrency), I'd advise you to use MYSQL, although it's quite feasible to have multiple processes performing searches on a SQLITE db at the same time, but not inserts (http://sqlite.org/faq.html#q5). It's a very bad idea to have the file being shared as proposed in question 2 above. To work effectively in SQLITE with concurrency you'd need to have a thorough understanding of how transactions (commits and rollbacks) work http://www.sqlite.org/lockingv3.html. I built a messaging queue for multiple processes sharing the same file in SQLITE. Unfortunately I can't find that old code, so no example from me today. I never used a remote file. I'm sure it's quite possible though, and I am quite interested in seeing how that can turn out. Hope that helps.
  3. Thanks for the advice.
  4. I was wondering if anyone has successfully tried to use 2 (or more) sqlite dbs simultaneously with the sqlite UDF. There are many scenarios where this could be desirable. For instance, suppose you have a memory db that stores and manipulates temporary data that is only required at run time, and you want to store only a subset of that data in a file db, say, when the user presses a save button, or something of the sort. Or maybe you want to verify if the permanent database already contains the data, for example: select * from temp.table1 as t inner join perm.table1 as p on p.pk = t.pk where t.col=match_condition; I can't quite figure out how the handle to temp can be passed to query perm, or the other way around. You can certainly use sqlite udf to attach the dbs using sqlite3.exe and generate a script that runs your query, but I'd rather not walk through that alley if a superior solution already exists Any thoughts anyone? As always, any help or advice will be greatly appreciated. Regards, Ivan.
  5. Thanks for posting this Dale. I've got a couple of scripts that produce the wend error regularly, so I'll go ahead and test it out. I'll post the output should this occur. Regards, Ivan
  6. $nDisable=1 $nEnable =0 WinActivate($hPDF) ControlClick($hPDF, "", "[CLASS:AVL_AVView;INSTANCE:15]") WinActivate($hPDF) BlockInput($nDisable) SendKeepActive($hPDF) Send("^+S") SendKeepActive("") BlockInput($nEnable)
  7. Thanks, I copied the file to a child directory in the script path and that was remedied.
  8. Cool, thanks Carolyn. You're right, _SQLite_Startup downloads the file if necessary by calling __SQLite_Download_SQLite3Dll which looks for http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll or http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3_x64.dll I ran your script and observed no changes, but it did help me figure out what's going on. Windows blocks the dll file in the System32 directory each time I copy the file. Regards, Ivan
  9. Thank you for the tips. I am quite aware of the x86 and x64 files. As for the slowness, it was the result of an embarrassing badly constructed query. Regards, Ivan.
  10. Perhaps this is a fix, I downloaded _SQLite_LibVersion=3.7.13 from the sqlite site and copied the file to the systemdir folder. I did notice sqlite is slow though, but at least it works. http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll doesn't on my machine. Regards, Ivan
  11. After being away from autoit for a while, I've picked up an old project again, but run into trouble when trying to use sqlite.dll On running _SQLite_Startup(), I get @error=1 (Call Prevented by SafeMode). It does not run with _SQLite_SafeMode(False) or _SQLite_SafeMode(True) I thought SQLite3.dll could have been overwritten in @SystemDir by a 3rd party app (thunderbird or other), and I replaced it with the file in http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite/SQLite3.dll in an attempt to fix the issue, but I think I could have made things worse. I did unblock the dll btw. Any thoughts on how I may fix this? I'm running: >"C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "F:db.au3" /UserParams +>02:16:43 Starting AutoIt3Wrapper v.2.1.0.8 Environment(Language:0409 Keyboard:00000409 OS:WIN_7/Service Pack 1 CPU:X64 OS:X64) >Running AU3Check (1.54.22.0) from:C:Program Files (x86)AutoIt3 +>02:16:43 AU3Check ended.rc:0 >Running:(3.3.8.1):C:Program Files (x86)AutoIt3autoit3_x64.exe Thanks, in advance for any help you may provide. Regards, Ivan
  12. Hi guys. Does anyone know a script that might help me recover deleted files. I tried but it didn't work. Thanks. Ivan
  13. Thx ProgAndy. I knew SysLinks controls were native, and found them difficult to handle in automation. Your script not only provides a means to create these controls but may also address Autoit's main purpose, automation, which gives it an additional advantage, not to dismiss the merit of any other alternatives. Taking a closer look at MrCreator's script you are quite right, it's a label with a predefined behavior. As for the rich edit alternative, I never wrote a fully fledged UDF simultation of a SysLink, because my script(s) were basically a sub part (the About) of other scripts, and I never got round to making something of general applicability that may be re-utilized. Every other About I created, I just copied entire sections of old scripts and pasted them in new scripts, edited as required ... not very efficient, shame on me, I know. Anyhow, ThumbsUp for this effort. Ivan
  14. Thanks for sharing. MrCreator posted yesterday but I must point that SysLink is a more appropriate name selection for the control than gui hyperlink. In any case, this is much better than how I used to track links on rich edit controls to simulate the SysLink control. Great work to all (Gary, MrCreator and Yashied). The one thing I'm going to miss from simulating SysLinks via Rich edit controls is being able to apply style to text. Regards, IVAN
  15. Thanks for sharing. I used to create rich edit controls with a hyperlink to then trace the click event via registered messages. This is much neater. Regards, Ivan
  16. Just for the sake of completeness, shouldn't you close the User32.dll, i.e, add a function: Func _PropList_Destroy($phwnd) GUIDelete($phwnd) DllClose($User32) EndFunc So after you leave the main loop in the example _PropList_Destroy($Gui)
  17. Very useful. Thx for sharing. I see your library deals with autoit syntax errors as well as COM errors. I liked the extra functionality like reporting, debugging and restarting. I took a look at the function _OnAutoItErrorRegister and I wonder if your library will work on compiled scripts in systems where Autoit has not been installed? All my computers have autoit installed, so I can't really test this unless I uninstall autoit. I've played with the idea of a general COM object error handling function for a while, in an attempt to implement different procedures according to the object that triggered the error. I must have made at least 3 unsatisfactory attempts and have always deferred further development because each time I encountered conflicting issues. That is the main reason why I've not posted anything before, but I'm very interested to see if and how you deal with them. Regards, IVAN
  18. Just wanted to share this link to sqlitestudio. I found it most useful in creating the SQL to establish table relationships, triggers, and constraints with which I always struggle prior to feeding data.
  19. I usually deal with dyinamic arrays with something of this sort if I desire a 1 based array: Dim $avArray[1] For $i = 1 To 100 ReDim $avArray[Ubound($avArray)+1] $avArray[Ubound($avArray)-1]=$i Next $avArray[0] = Ubound($avArray) Although I usually keep my arrays as zero based, and use Ubound to get the count. This is a matter of preference but many of the Autoit funcs will return arrays with element 0 containing the count of elements, so I often find juggling between the 2. Plugins are experimental and it is uncertain if they are going to remain in future versions of Autoit. Like with Static, I would refrain from using these until I am certain that they will be kept in future versions. This reduces the risk of making scripts obsolete when a new version is out.
  20. Wouldn't that imply 2 iterations, 1 for counting the other for assigning values to the added elements of the array?
  21. Now that makes sense.
  22. I get undefined function errors:
  23. @Manadar: I did take a look at the 3 scripts provided and my comments were attempting to tackle the larger issue of security which is the whole purpose of such scripts. I did not have any intentions of providing destructive criticism, rather than that, I believe I politely and respectfully made a contructive list of issues a security script has to handle. While working on a solution for a language teaching application for a customer, it took me a lot of trial/error write, re-write several scripts, and my desire was to share some of the experiences I came accross, and to be honest, I'm not totally satisfied with my solutions either. It's actually a shame 3 1/2" Floppies have falen out of use. My earliest work on this dates about 8 years, and the best solution I could come up with was to distribute a floppy with minimal physical dammage together with the CD. The location of the damaged clusters was hard coded on the software, so verifying the legitimacy of the CD was related to a non logical but a physical key. I dropped this also years ago for several reasons, not to mention that using damaged hardware wasn't particularly the best idea, but also verifying that the physical damage on the floppy existed and it was not a mirror copy of the damaged disk was time consuming. I must admit, I had lots of fun doing it though. @Cagiva: My intention was to be helpful and if I have offended you, please accept my sincere apologies. Regards, Ivan
  24. You might want to search the forum for similar discussions or ideas you might like to use to complement your security mechanism. You'll eventually find that perfection in this subject is pretty much like the search for the Holy Grail... Problem #1: As it sounds your keys are generated on the computer your software is being installed. You grant ease of installation here by issuing a key together with the CD, but there is a major shortcomming. Abc buys your software, makes an IDENTICAL mirror copy of your cd (includes CD serial number, file, directory attributes, including dates, etc). The key issued for that CD will be valid for all identical copies... Once a valid key has been issued on the pirate market, it's pretty much unstoppable. You might want to revise your procedure by associating the generated key to "unique??" data of the computer where your software is being installed. If you look hard enough you will see that hardware information (use WMI for this) is not totally reliable, so you might want to complement it with somo OS installation data (file date of the io.sys file, the recycler). The discussions get quite interesting. That will require some validation (encrypt/decrypt procedures) on your part and make the issue of distribution much more cumbersome. As to the "uniqueness" of data, it's another very debatable issue. Again, check the forum for discussions. A typical procedure at this stage is: On first run, generate the unique encrypted string. Instruct the user to purchase your product and submit this generated key. Once you confirm the purchase, you decrypt the key and issue an activation key using another algorithm. There are some variations on this, but it's a matter of personal choice. Problem #2: Algorithms can and are cracked, so the stronger the generated key the stronger your overall security. Bear in mind that memory and processing capabilities are quite powerful, so you should consider stronger encryptions. Problem #3: Even with the procedure suggested in #1, you will need to store data somewhere, registry, file, wherever... That data can be erased... Problem #4: Cracking... This is a decompile, recompile issue. At some point your program will evaluate conditions whether it's a valid copy or not. Suppose this is done by a function you call _ValidateProgram(), so If Not _ValidateProgram() Then Exit ; do whatever If your cracker changes your validation procedure to Func _ValidateProgram() Return True Endfunc The security system has collapsed. To solve this, your validation procedure has to be linked to some critical process of the program. A strong security system has to address all these issues, and probably more. I have done my fair share of work on this. but unfortunately, I have not been authorized to disclose any code, so the best I can do is just point you out in the right direction. IVAN
×
×
  • Create New...