Posted by Michael Horvath under Technology  PRESS News  on Sep 30 2021


Our beta test phase has successfully completed and we have released PRESS v4.1 to the public! This new release makes script development for automation macros much easier than in past. We will continue efforts at building up the macro library so that our users won't have to use this feature in cases where there is a library entry for a website being added to your password vault. We hope that you will help us if you create a script for a website not already in the library that is distributed with PRESS install package.

You can email us your library file with any changes you have made. mailto:mike@horvathsoftware.com We will vet submissions and add them to the install package version of the library for future releases of PRESS.

We recently revised PRESS to ask you if you would like to send us your library file when you click the Update Library button on the Website Learner screen. If you choose to send the file your default email client will be used with the email generated automatically containing an attachment file that is the library file. We strive to make the lives of our users a little easier in whatever ways we can.

Thank you for using PRESS and for reading this post! Have a blessed day!

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Sep 23 2021

We are continuing Beta testing of the Advanced Website Learner screen. During our tests we found issues that prompted us to expand the scope of the change to include the Basic mode editor as well as Advanced mode editor. We found that a lot of websites would not let you access them with the built in browser control of the Basic mode editor. We set out to make the browser work with most if not all websites as of today's date.

We researched solutions and determined that Microsoft's WebView2 class implements a browser that is up to date. This browser class does not allow much of the capabilities found in our original browser control so we redesigned the Basic mode editor to work with the new WebView2 class. We feel that the new design is easier to use than the old one, but would appreciate any feedback from users with their opinions of the user interface.

We will continue Beta testing and thank you for following our progress on this feature update to PRESS. Have a blessed day!

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Sep 10 2021

While working on the editor for PRESS Advanced Website Learner script editing we attempted to use the rich text box Undo and Redo capabilities but found that these did not work correctly due to the way the text changed event handler method performed syntax highlighting for the editor. We decided to disable the rich text box Undo and Redo and create our own.

The following code shows the methods for Undo and Redo. These make use of lists that are defined as private members of the Window class of the script editor window. The text changed event handler adds text for each change to the undoStack list.

        private void Undo_Click(object sender, RoutedEventArgs e)
        {
            richTextBox.TextChanged -= richTextBox_TextChanged;

            var undoArray = undoStack.ToArray();

            if (undoStack.Count > 1)
            {
                TextRange txt = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);

                if (redoStack != null)
                {
                    redoStack.Add(txt.Text);
                }

                txt.Text = "";

                richTextBox.AppendText(undoArray[undoArray.GetUpperBound(0)-1]);

                txt.ApplyPropertyValue(TextElement.FontFamilyProperty, rtbFontFamily);
                txt.ApplyPropertyValue(TextElement.FontSizeProperty, MyStringExtensions.RTB_FontSize);

                var blocks = richTextBox.Document.Blocks;

                foreach (var block in blocks)
                {
                    Paragraph p = block as Paragraph;
                    p.Margin = new Thickness(0);
                    p.FontSize = MyStringExtensions.RTB_FontSize;
                    p.LineHeight = 1;
                }

                undoStack.RemoveAt(undoStack.Count - 1);

                var eChangeArgs = new TextChangedEventArgs(e.RoutedEvent, UndoAction.None);

                richTextBox_TextChanged((object)richTextBox, eChangeArgs);
            }
            else
            {
                MessageBox.Show("Nothing left to undo.", "No Changes Left", MessageBoxButton.OK, MessageBoxImage.Information);
            }

            richTextBox.TextChanged += richTextBox_TextChanged;
        }

        private void Redo_Click(object sender, RoutedEventArgs e)
        {
            richTextBox.TextChanged -= richTextBox_TextChanged;

            var redoArray = redoStack.ToArray();

            if (redoStack.Count > 0)
            {
                TextRange txt = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);
                txt.Text = "";

                richTextBox.AppendText(redoArray[redoArray.GetUpperBound(0)]);

                txt.ApplyPropertyValue(TextElement.FontFamilyProperty, rtbFontFamily);
                txt.ApplyPropertyValue(TextElement.FontSizeProperty, MyStringExtensions.RTB_FontSize);

                var blocks = richTextBox.Document.Blocks;

                foreach (var block in blocks)
                {
                    Paragraph p = block as Paragraph;
                    p.Margin = new Thickness(0);
                    p.FontSize = MyStringExtensions.RTB_FontSize;
                    p.LineHeight = 1;
                }

                redoStack.RemoveAt(redoStack.Count - 1);

                var eChangeArgs = new TextChangedEventArgs(e.RoutedEvent, UndoAction.None);

                richTextBox_TextChanged((object)richTextBox, eChangeArgs);

                txt = new TextRange(richTextBox.Document.ContentStart, richTextBox.Document.ContentEnd);

                if (undoStack != null)
                {
                    undoStack.Add(txt.Text);
                }
            }
            else
            {
                MessageBox.Show("Nothing left to redo.", "No Changes Left", MessageBoxButton.OK, MessageBoxImage.Information);
            }

            richTextBox.TextChanged += richTextBox_TextChanged;
        }
   

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Sep 07 2021

Just today I ran into an issue of opening my compiled html help file for the PRESS project to a specific topic under program control. Long story short found some help from Stack Overflow and here. The secret found on the site we linked to in this post is the -mapid switch of the hh.exe found in SysWow64 folder under Windows folder.

Here's what my completed method for help looks like:

        private void Help_Click(object sender, RoutedEventArgs e)
        {
            string path;
            path = System.IO.Path.GetDirectoryName(
               System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);

            var editedPath = path.Replace("file:\\","");

            System.Diagnostics.Process process = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            // don't hide it unless you really don't want the user to see the help, but what would the point of that be?
            // startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            startInfo.FileName = @"c:\Windows\SysWow64\hh.exe";

            // help topic 13
            startInfo.Arguments = " -mapid 13 \"" + editedPath + @"\PRESS v3.1 Help.chm" + "\"";
            process.StartInfo = startInfo;
            process.Start();
        }
        

Tagged --no tags--
Posted by Michael Horvath under Technology  PRESS News  on Sep 07 2021


We are working on an enhanced Website Learner Advanced mode script editor that will make writing macros for login and change password automation much easier to do. This feature enhancement is currently in Beta test phase and we are letting users have a preview of the new feature by downloading latest published version of PRESS. Please get this version of PRESS today and see what you think of the script editor. You can give us feedback on anything you see in the editor that needs improvement.

As always thanks for reading our post and may your day be blessed!

Tagged --no tags--