Messages - stophereareyou [ switch to compact view ]

Pages: [1] 2 3next
1
Developer's Corner / Save/Load list of hotstrings in ini autohotkey
« on: February 11, 2018, 07:51 AM »
I want to Save/Load list of hotstrings in ini.
I can save with iniwrite but how to load saved list so they work as hotstrings is my problem.
I have tried #include, list.ini
this works. Loads list and saved list can be loaded with script reload in .ahk file.
But when I compile to .exe, list.ini get compiled and embedded in same exe file, iniwrite writes new hotstring in local directory list.ini but only load hotstrings from embedded file.

2
Though the Keys enum has identical values for Enter and Return (it also has a number of other duplicates), ToString shows a different value.

If you run this linq expression in linqpad, you'll see what I mean.

Code: C# [Select]
  1. Enum.GetNames(typeof(System.Windows.Forms.Keys))
  2.     .GroupBy(k => Enum.Parse(typeof(System.Windows.Forms.Keys), k))
  3.     .Where(g => g.Count() > 1)
  4.     .Select(g => String.Join(", ", g.Select(k => k.ToString()).ToArray())).Dump();

Check for the tostring if you really need to know the difference.

Hello wraith808,
I did not understand all of it but,
Tried it in C# as follows

           
 foreach (var VARIABLE in Enum.GetNames(typeof (System.Windows.Forms.Keys))
                .GroupBy(k => Enum.Parse(typeof (System.Windows.Forms.Keys), k))
                .Where(g => g.Count() > 1)
                .Select(g => String.Join(", ", g.Select(k => k.ToString()).ToArray())))
            {
                richTextBox1.AppendText(VARIABLE+"\r\n");
            }

Got following...
Enter, Return
CapsLock, Capital
HangulMode, HanguelMode, KanaMode
KanjiMode, HanjaMode
IMEAccept, IMEAceept
Prior, PageUp
PageDown, Next
Snapshot, PrintScreen
OemSemicolon, Oem1
Oem2, OemQuestion
Oem3, Oemtilde
Oem4, OemOpenBrackets
OemPipe, Oem5
OemCloseBrackets, Oem6
OemQuotes, Oem7
Oem102, OemBackslash

that is Enter and Return does have same value,
Thanks for your time and code, I might have missed your point if you are telling something more than I've understood,

but is there any difference between Main Enter Key and Enter Key on Numpad!?

Firdaus Shaikh
('',)

3
Developer's Corner / Distinguish Enter and Numpad Enter Key c#.net
« on: March 16, 2013, 04:24 AM »
Hello Every one,

Is there any way to distinguish Numpad Enter key and Normal Enter Key,

in c#.net<code> KeyCode, KeyCode</code> and <code>KeyValue</code> for both keys are same,

is there any other way or some workaround for distinguishing Events raised by both keys?!


Firdaus Shaikh
('',)

4
Developer's Corner / Re: Titlebar Button
« on: January 14, 2013, 01:22 AM »
Well actually I tried in c#.net, there are no default options,
There is 'ActiveButtons' library that implemented it
information here
and Code and Sample here
but it only add button near minimize button and don't allow to add buttons at different location, with this:
> I can't add button near minimize button and near title icon...
> I can't add button any other location than near minimize button...

I have tried and googled for other possible sample or tutorial for same but there are none as clean as this...

there are many software those implement such thing eg IDM, 4t-min and other like those implement extra functions like minimise to tray, roll window in titlebar, locking window on top etc.
even I have seen in this forum or somewhere, a code to add time in title bar in ahk,

is there other way i can do, or in different language and use it's library to implement it's controls may be...


by the thanks for your reply Renegade,
Firdaus Shaikh.

5
Developer's Corner / Titlebar Button
« on: January 13, 2013, 04:27 AM »
is there a way to add custom buttons to show and keep on title bar, at given coordinates?

i.e. near minimize button and/or near icon or title...


Firdaus Shaikh.

Pages: [1] 2 3next
Go to full version