zoukankan      html  css  js  c++  java
  • 基于MFC实现的快速输入文本小工具

    有时候需要重复输入大量文字,反复Ctrl+C反复Ctrl+V 还是很浪费时间,于是我自己写了这个小工具,运用Ctrl+数字实现十个文本的快速输入。

    只要是能使用Ctrl+V的地方,本工具都可以正常使用。

    界面如图:


     使用方法也非常简单,启动软件,直接在需要输入文本的地方按快捷键即可。

    如果需要修改文本,则双击修改。

    支持时间格式转换,在需要插入时间的地方输入“【时间格式:%Y年%m-%d %H:%M:%S】”即可,其中至少有一个%号,其他内容根据需要任意修改,比如:

    【时间格式:%Y年%m月%d日 %H:%M:%S】

    【时间格式:%H:%M:%S】

    【时间格式:%Y年%m月 %H:%M】

    这部分的转换代码为:

        //author:autumoon
        //联系QQ:4589968
        //日期:2021-09-16
        CString transFormat(const CString& strContent)
        {
            CString strNewContent = strContent;
            int idx_s = strNewContent.Find(_T("【时间格式:"));
            if (idx_s != -1)
            {
                //转换类容
                CString strTime; //获取系统时间
                CTime tm;
                tm = CTime::GetCurrentTime();
         
                int idx_e = strNewContent.Find(_T("】"), idx_s);
                while(idx_e != -1)
                {
                    //逐个替换
                    CString strFormat = strNewContent.Mid(idx_s + 1, idx_e - idx_s - 1);
                    if (strFormat.GetLength() >= 5)
                    {
                        strFormat = strFormat.Mid(5);
                    }
                    strTime = tm.Format(strFormat);
                    strNewContent = strNewContent.Mid(0, idx_s) + strTime + strNewContent.Mid(idx_e + 1);
                    idx_s = strNewContent.Find(_T("【时间格式:"));
                    if (idx_s == -1)
                    {
                        break;
                    }
                    idx_e = strNewContent.Find(_T("】"), idx_s);
                }
            }
         
         
            return strNewContent;
        }

    工具最新版软件下载地址FastInput.rar:秋月的私语小工具集_免费高速下载|百度网盘-分享无限制https://pan.baidu.com/s/1eSPG4RS

     蓝奏云:FastInput.rar - https://autumoon.lanzoui.com/iu1ziu4qhli 密码52pojie(本来打算发在52pojie的,因为之前的失望经历,想想还是算了)

    软件杀毒:

     


     软件是拿来自用的,所以没有写得太复杂,欢迎交流与讨论。

  • 相关阅读:
    SQL如何获取上一条..下一条..首尾记录
    PHP判断浏览器类型的代码
    html命名规范
    使用JavaScript JS 获取label for 标签的值和for值
    PNG透明兼容IE6的几种方法
    冉茂锋同学去上课了
    十一戒,自勉
    语录
    CreateThread最后还是调用的ntdll.dll里面的ZwCreateThread
    InitializeObjectAttributes
  • 原文地址:https://www.cnblogs.com/autumoonchina/p/15303422.html
Copyright © 2011-2022 走看看