topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday November 13, 2025, 6:08 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 167 168 169 170 171 [172] 173 174 175 176 177 ... 309next
4276
General Software Discussion / Re: sorting units of text
« Last post by MilesAhead on July 01, 2012, 07:09 PM »
Another approach may be using a pattern matching language/program. One that's pretty easy to pick up is awk/nawk/gawk .. you can find various free implementations of awk for Windows. In a nutshell it operates on a line of text at a time. When you encounter a pattern, such as some particular thing found in the line like a Tab, colon, substring or whatever, you can set a variable to indicate doing some particular action until the state changes. For example if you find a start tag, then do such and such with the following lines of text until some terminating condition(an empty line for example) is encountered.

It's so long since I used it I totally forget the syntax.  But it's really designed for sifting through text input, rearranging or skipping certain portions, and then writing the output.

Plus you can find a ton of "awk one liners" on the web.  There have to be zillions of canned scripts for awk out there for free.

http://www.pement.org/awk/awk1line.txt

4277
General Software Discussion / Re: sorting units of text
« Last post by MilesAhead on July 01, 2012, 05:24 PM »
Vim has a page for user contributed scripts. You may find one you can modify to your scheme

http://www.vim.org/s...t_search_results.php

4278
General Software Discussion / Re: sorting units of text
« Last post by MilesAhead on July 01, 2012, 04:40 PM »
Try vim

I don't know of any other free Windows text editors that can match it when it comes to manipulating paragraphs. But you'd have to absorb the learning curve.

The "sort it afterwards" part of your plan seems to be the sticking point.

As far as free form text entry in TreePad I would create a node for it.  Perhaps "Uncategorized" and just type paragraphs in that node.

A programmable editor such as vim seems to be the best chance of unscrambling the current mish mash.
4279
General Software Discussion / Re: sorting units of text
« Last post by MilesAhead on July 01, 2012, 01:21 PM »
Instead of a plain text file you may consider using TreePadLite

If you are using text only then the free version should do all you need. The paid versions can do things like embed graphics.  In the free version hyperlinks are not underlined, but if you put the caret on one and hit Control-h it will browse to the url.

The "cat1" you use as tags would instead be nodes in the tree and show on the left.  Here's a screen shot

TreePad.jpg


Of course all the work would be transfer of the plain text to the TreePad file. But they do publish their format, at least for the TreePadLite plain text.  They also have links to 3rd party software that works with TreePad. Most of it is paid though.

edit: initially you may have to do a lot of cut & paste.  But there is a button in the toolbar to Sort a subtree.   You can add subtree nodes as you go and paste in the text, then just hit the Sort button to put the nodes in order.

edit2: here's the spec for TreePad file format:
http://www.treepad.c.../docs/fileformat.txt

To create a file of nodes with a paragraph of text for each node is not difficult.  In TreePadGen the text for each node was blank. I just got all the filenames in a folder and added a node for each. You could do something similar by detecting "cat1" tags and then adding the associated paragraph.  For a bunch of nodes on the same level it's not hard to add the file markers between each node in a loop.  The tough part would likely be digging out the tags, then determining when the text was finished. Handling dupes might also be an issue.

It's one approach.  Also supposedly other note taking type apps can import TreePad files if you change in the future. (I say "supposedly" because I didn't spend any money to test any of the paid apps that claim to be able to import TreePad. Just standard skepticism if I haven't tried it myself.) :)
4280
General Software Discussion / Re: Transpose 2.3.0.5
« Last post by MilesAhead on June 30, 2012, 05:34 PM »
Use the Window Spy to get the class name for firefox window of the version of FF you are using.  They change the class name when they feel like it as they update versions of browsers. For example

GroupAdd,FireFoxGroup, ahk_class MozillaUIWindowClass ;Firefox Browser
GroupAdd,FireFoxGroup, ahk_class MozillaWindowClass   ;Firefox 4 Browser
GroupAdd,FireFoxGroup, ahk_class NewFFClass   ;whatever new FF version class is

  Process, Exist, firefox.exe
  if (ErrorLevel) ; process is running
    WinActivate, ahk_group FireFoxGroup
  else
     Run M:\Archivos de programa\Mozilla Firefox\firefox.exe
  return



To pick out particular tabs then you'd have to ask on ahk forum.
4281
Living Room / Re: Odd cookie problem
« Last post by MilesAhead on June 27, 2012, 02:19 PM »
If all the machines are W7 you might try posting here:
http://www.sevenforu...s.com/browsers-mail/

Could be something about the user account setup on laptop is different? If nothing else there's likely more exposure of your issue on that forum.
4282
Living Room / Re: Odd cookie problem
« Last post by MilesAhead on June 26, 2012, 10:53 PM »
Only other thing I can think of off hand is contact the site. Maybe they are getting similar reports from other users.
4283
Living Room / Re: Odd cookie problem
« Last post by MilesAhead on June 26, 2012, 06:26 PM »
My problem is that on my laptop it is all browsers - but only one website affected. Just looking at FF to investigate. I mostly use Chrome these days.
-Carol Haynes (June 26, 2012, 06:10 PM)

That does seem a bit weird.

You might try Chrome Cookies View from NirSoft to check out what's up with chrome. That helped me set up which sites I could use cookies for login while still having the browser set the rest of the time to session only cookies.

4284
Living Room / Re: Odd cookie problem
« Last post by MilesAhead on June 26, 2012, 06:05 PM »
I don't use FF that much. For that reason I have it set to delete all cookies and cache on close. Is there a "white list" to accept all cookies from a site?  Do you have NoScript installed?

What I do on chrome is set it to accept cookies permanently, login to all the sites where I want cookie login. Then I close it, open and change back to session only cookies and use LastPass for all the other sites.

I only use FF as secondary now. I forget how to use many of the settings and AddOns.
4285
General Software Discussion / Re: FolderCache 6.3.6.0
« Last post by MilesAhead on June 26, 2012, 04:20 PM »


Syncrify client compare folders on the local machine with corresponding folder on the server to determine if it contain files that require backup. This is the default behavior and is done for every folder on the client machine.

When folder cache option is enabled, Syncrify creates a local cache file containing this list for comparison. This cached data is stored in a sub-folder called FolderCache off of the Data Folder.

As with every option, there are pros and cons:
-kevinyoukilis264 (June 26, 2012, 08:57 AM)

I'm not familiar with "Syncrify" and have no clue why the information you posted relates to my program. If there's a connection please elaborate.

edit: the only thing I can think of is you mean there's a folder name clash because the other program uses a folder named "FolderCache" ??  The folder you unzip FolderCache into can be named anything. It uses the exe path to find the directory where the .ini file and data files are kept. The folder name "FolderCache" is not hard wired. I just copied all my FolderCache files into a new folder named CacheTest and ran it from there. Works the same.

4286
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 26, 2012, 01:54 AM »
@4wd sorry. I tend to post, then go back and edit. I should proof my posts more thoroughly before hitting the button.  It contributes to confusion.  Trouble is I get so many typos that slip through the spell check that I seem to need to edit endlessly.  Sheesh. :)

4287
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 25, 2012, 11:54 PM »
FWIW, I think there's been a genuine misunderstanding here. My impression is of two people intending to be helpful. I can learn a little something from either side of the discussion, so thank you both.

I don't think it's a matter of IQ. If another is better at something than I, that doesn't necessarily result from a higher IQ than mine (though in my own case it almost certainly does mean that — the "For Dummies" series was clearly written for those like me). It probably means that the other has more or different experience.
-cranioscopical (June 25, 2012, 07:00 PM)

I agree with you. In fact I have a sig I like to use sometimes "How come we don't know the I.Q. of the guy who invented the test?"

What I keep running into, even on scripting language forums is "using scripting language = beginner" assumptions. I was doing OOP over 20 years ago. For small utilities on Windows AHK_L and AutoIt3 are simpler and more fun. The hotkey functions in MS Windows API don't even work.  At least trying the simple mouse click ones I got zero functionality. A waste of time. For what I'm doing the scripting stuff is superior.

I suppose since I don't have a CS degree I should keep a reading list of all the text books I studied on my own when learning this stuff.  But then some nerd will  imply I copied the author's names and didn't read any of the material. You can't win with these types.
4288
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 25, 2012, 11:17 PM »
Ways to skin cat > 1 :)

edit: I liked Pascal when I first started since it's nearly self-commenting. That's why I like it if my code "spells out" what I'm doing. If it works consistently I'm cool with it. :) Personal preference I guess. :)
4289
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 25, 2012, 04:45 PM »
I think the main risk I've seen using variants and implicit conversion is in comparisons. When I was new to AutoIt3 I got some strange results in comparisons because I didn't realize that reading a value from an .ini file produced a string, no matter the value. Ini files often use 0 for False and 1 for True. It was easy when typing in code to make the error demonstrated by the top half of the code below(esp. since in .ini files strings are not quoted. Easy to see it as boolean instead of string.) That's why I came up with _IniBool() function. It seems trivial but with it you can actually use Boolean values in AutoIt variables and True or False will be written to the .ini using IniWrite. If the user changes it to 1 for true and 0 for false, it still functions as expected.

$val = "1"
If $val Then
MsgBox(0x1040,"test","$val is True" & " " & $val)
Else
MsgBox(0x1040,"test","$val is False" & " " & $val)
EndIf


$val = "0"
If $val Then
MsgBox(0x1040,"test","$val is True" & " " & $val)
Else
MsgBox(0x1040,"test","$val is False" & " " & $val)
EndIf

$val = "1"
If _IniBool($val) Then
MsgBox(0x1040,"test","$val is True" & " " & $val)
Else
MsgBox(0x1040,"test","$val is False" & " " & $val)
EndIf


$val = "0"
If _IniBool($val) Then
MsgBox(0x1040,"test","$val is True" & " " & $val)
Else
MsgBox(0x1040,"test","$val is False" & " " & $val)
EndIf

Func _IniBool($val)
    If $val = "True" Or $val = "1" Then Return True
    Return False
EndFunc   ;==>_IniBool



For the AHK_L code in question this demonstrates that one can stick the result of SubStr() in another dedicated variable. But since there's no comparison it's just the creation of another variable for no real reason. I found out from Lexicos the author of AHK_L when you create a variable, even a local in a function, the storage is there for the life of the program run. He stressed the main danger of doing things like myObject := 0 to clear an object is if you have other references to the same object. In that case you can get side effects/unexpected behavior.  For that reason I modified a small utility I wrote to create an object as a local inside a function, then return the result out to the global. Lexicos says that even though the local variables don't "disappear" when the function returns like compiled program stack variables, the storage is reused on the next function call.  So basically, if I make sure I only see one reference to an object, I can safely clear its contents with myObject := 0. In which case the variable myObject is now a numeric.  But then you can just assign the object returned from the function and its type is restored to Object.

Fun stuff. Here's a link to the discussion where I asked about just setting an object to 0 to clear the contents. The link is pretty much the climax of the topic.

http://www.autohotke...amp;start=15#p544146

Here's ahk sticking the result of SubStr() in a different variable


mySerial := 1
myFactor := 2
myTemp := 0

^g:: ; Ctrl+G, change to whatever you want.
{
;mySerial := SubStr("000000" . mySerial, -5)
  myTemp := SubStr("000000" . mySerial, -5)
  SendInput, % myTemp
  mySerial += myFactor
}
Return

It works. But in this case since I never compare myTemp or mySerial to anything, there's no purpose served.

I also do C#. It's a strongly typed scripting language as opposed to scripting such as AutoIt3 and AHK where they just use Variants for everything.  One benefit of the "one size fits all" Variant is that it makes it easy to interface to system scripting stuff that's all IDispatch based.

In any case, I never held a job with "developer" or "programmer" as the job title. But I've been programming in various languages steadily since I first got hooked in 1986. I guess it just seemed pointless to me and a bit insulting to be offered tips on correct programming practice by someone who doesn't even understand the language in question. It would be like me lecturing someone by saying "I don't know a damn thing about Lisp but if I was doing it in Pascal I sure wouldn't do what you're doing there buddy!"  heh heh

Generally I find it better to ask for working code than argue. If someone can demonstrate what they claim, and I can run i and see their point, the argument is over pretty quickly. Otherwise it tends to degenerate into who claims to have the highest IQ. :)

4290
General Software Discussion / Re: Transpose 2.3.0.5
« Last post by MilesAhead on June 24, 2012, 06:19 PM »
Glad you got it working. :)
4291
General Software Discussion / Re: Transpose 2.3.0.5
« Last post by MilesAhead on June 24, 2012, 03:31 PM »
ReOpen is stable. I don't plan any updates. I don't use it myself anymore. I use FolderCache and ReRun to accomplish the same thing. ReRun can capture command line args where ReOpen can't.  Also AutoIt3 hotkey handling is not as good as AHK_L. In ReOpen I just test if middle mouse button is down. Way too primitive to add stuff onto.

Try something like this in ahk_l

~MButton::
  Process,Exist,gmw5.exe
  if (ErrorLevel) ; process is running
    WinActivate,gmw5_window_title ; whatever the title or class is
  else
    Run,Y:\GoldminePrg\gmw5.exe /i:esm /u:JOSE /p:
return

If you only want the middle button click to fire in certain windows or
on the desktop see the help for #IfWinActive directive.

You may have to experiment with quoting the command line params but it shouldn't take much to get it working.
4292
General Software Discussion / Re: Transpose 2.3.0.5
« Last post by MilesAhead on June 24, 2012, 12:35 AM »
Transpose 2.3.0.5 Fixed bug in "hit test" code that determines where in the window the mouse was clicked.
4293
General Software Discussion / Re: Transpose 2.3.0.4
« Last post by MilesAhead on June 23, 2012, 08:55 PM »
Transpose 2.3.0.4 Added hit test so that pressing middle mouse button in an Explorer Window only sends a double click if the mouse pointer is in the client area of the window.  The idea is to avoid unintentionally double clicking the caption bar as it may conflict with other hotkey apps.
4294
General Software Discussion / Re: ShapeShift By Miles Ahead
« Last post by MilesAhead on June 23, 2012, 03:28 PM »
I would like to know the meaning of

"Pass margin=n to adjust Desktop Margin
Valid range for n is 0 to 12 . Default is 4"

Best Regards
 :-*

Readme.txt search on "margin"
4295
General Software Discussion / Re: Shape Shift 1.0.9.0 and MoveIt 1.1.8.8
« Last post by MilesAhead on June 23, 2012, 03:26 PM »
MoveIt 1.1.8.8 Fixed regression introduced in previous revision where active window handle was not always obtained during hotkey handling.
4296
Finished Programs / Re: DONE: Generate sequential serial numbers
« Last post by MilesAhead on June 22, 2012, 06:20 PM »
Like I said, I was just trying to give a tip on good practice in coding.

Please explain to me how the code would work correctly,
...


I think you are taking the wrong approach. Since you are expert on correct programming practice it should be trivial to post original working code in ahk that does what mine does, but in a superior fashion. If it's better I'll say so and probably copy it. But until I see working code from you in ahk, pardon me, but I'll ignore your comments on this issue.  Anyone can heckle. Producing something that works is more impressive. :)

4297
General Software Discussion / Re: Shift Kicker 1.1.1.6
« Last post by MilesAhead on June 22, 2012, 06:07 PM »
You may prefer Toggle2. You can use it to make 2 non-maximized sizes for a window. But using it is not transparent like just clicking maximize.

The reason I wrote Shift Kicker is to leave space for RocketDock without shrinking the desktop work area. It's not for everyone.
4298
General Software Discussion / Re: Shift Kicker 1.1.1.6
« Last post by MilesAhead on June 21, 2012, 11:38 PM »
I already typed this stuff in About Box. Retyping here won't elucidate the matter I suspect.

4299
General Software Discussion / Re: Shift Kicker 1.1.1.6
« Last post by MilesAhead on June 21, 2012, 06:48 PM »
Hi Miles, can you explain more what this actually does? "Maximize with a task bar gap" - when I maximize (rarely!) my taskbar is still there. (Is that not normal behavior?) But then with these UI types of things, maybe the custom theme I put in a while ago tweaks my machine out of normal XP.

Run it and click the maximize button on a window. It's self-evident.
4300
General Software Discussion / Re: Shift Kicker 1.1.1.6
« Last post by MilesAhead on June 21, 2012, 05:34 PM »
Shift Kicker 1.1.1.6 Made a slight timing adjustment. The response should be more natural. Reversing the action of the shift key has the additional side effect that on Windows Seven you may double click the caption bar to maximize with a gap.  Hold down shift while double clicking to maximize normally.
Pages: prev1 ... 167 168 169 170 171 [172] 173 174 175 176 177 ... 309next