Search found 189 matches

by Johana
31 Jan 2018, 09:17
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file

I suggest the following: Check, if the file C:\Users\MyUser\Desktop\1.txt exists. If so, the FileMove failed. Add a FileDelete, C:\Users\MyUser\Desktop\1.txt above the loop. Check ErrorLevel and A_LastError after it. Check ErrorLevel and A_LastError after FileMove . If that doesn't solve the proble...
by Johana
30 Jan 2018, 05:57
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file

just me wrote:'Doing nothing' is exactly what you want. It doesn't append the line to C:\Users\MyUser\Desktop\1.txt. ;)
You lost me there - The entire purpose of the script is to remove a string - If it's matching but doing nothing it lost it's purpose. What am I missing? :)
by Johana
30 Jan 2018, 05:23
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file

For a test file with two lines I'd do the following: Loop, Read, C:\Users\MyUser\Desktop\Autohotkey.txt, C:\Users\MyUser\Desktop\1.txt If (A_LoopReadLine = test) { Msgbox, Match: %A_LoopReadLine% Continue } else { Msgbox, Other: %A_LoopReadLine% FileAppend %A_LoopReadLine%`n } It's matching, but do...
by Johana
30 Jan 2018, 05:10
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file ÅÄÖ filepath

just me wrote:How would it 'work more than one time' after you deleted the lines of interest during the first run?
A very good question dear Watson - Well spotted:

The file is a testfile with 2 lines. If "#z::Run www.autohotkey.com" got deleted, i just insert it back and save the file.. :)
by Johana
30 Jan 2018, 03:49
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file ÅÄÖ filepath

If A_LoopReadLine = %test% ; or If (A_LoopReadLine = test) ? Or do you use AHK v2? No not using V2.. Still not working. I just don't understand why. Seems to be something with the computer. I ran this script 20 times. It worked one time. No Changes: #NoEnv #SingleInstance, force test := "#z::Run ww...
by Johana
30 Jan 2018, 03:05
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Re: Delete string from ahk file ÅÄÖ filepath

If A_LoopReadLine = test P.S: I wrote you a PM. Cheers Thanks I tried that too to no avail already. Here's the exact code. test := "#include d:\My Specialfolder\Göteborg folder\development\Myfile.ahk" msgbox, % test Loop, Read, C:\Users\MyUser\Desktop\Autohotkey.txt, C:\Users\MyUser\Desktop\test_Au...
by Johana
29 Jan 2018, 19:17
Forum: Ask For Help
Topic: Simple things just don't work
Replies: 1
Views: 411

Re: Simple things just don't work

I'm really trying to learn about AHK but I guess I get stuck on some very basic things. I'm simply trying to prevent pasting in Notepad. #IfWinActive, Untitled - Notepad if (UserInput = "^v") Send, {v} return if (UserInput = "+{Insert}") Send, {v} return #IfWinActive, Untitled - Notepad ^v:: SendIn...
by Johana
29 Jan 2018, 10:39
Forum: Ask For Help
Topic: Delete string from ahk file
Replies: 14
Views: 1625

Delete string from ahk file

It's not working to delete a string using loop and read. Perhaps I am doing it wrong. String to locate and delete: "#include d:\Åäö bbla bla\file.ahk" - Yes, there's space in the filepath/string i can't do anything about. test := "#include l:\testing\åäö åäö" msgbox, % testa ; Works fine Loop, Read,...
by Johana
24 Jan 2018, 07:47
Forum: Ask For Help
Topic: Counting files inside folder with different name + counting numbers inside filename
Replies: 8
Views: 943

Re: Counting files inside folder with different name + counting numbers inside filename

I'd parse for the filename ... a) extracting the username b) creating an array named after the extracted username c) push all upcoming details that are assigned to that specific user into its array d) once the file filtering has been finished create a CSV file based on the array data (or trigger Ex...
by Johana
24 Jan 2018, 03:54
Forum: Ask For Help
Topic: Counting files inside folder with different name + counting numbers inside filename
Replies: 8
Views: 943

Re: Counting files inside folder with different name + counting numbers inside filename

You can start with the Example #3 in Loop (files & folders) . When you are able to list and display all files, you can make second step, which could be creating a Gui for displaying desired data. Good luck. Not getting it to work, it's not displaying the files :S #SingleInstance, force #Persistent ...
by Johana
22 Jan 2018, 08:51
Forum: Ask For Help
Topic: Counting files inside folder with different name + counting numbers inside filename
Replies: 8
Views: 943

Counting files inside folder with different name + counting numbers inside filename

I have inside a folder textfiles that shows me how many times a script (name) has been run (0000) by a user (user). Name_User_0000.txt Basically I want to be able to make statistical use of this. I need to: Count how many times a user has run a script Count what scripts a user has run Count how many...
by Johana
11 Dec 2017, 08:16
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 2338

Re: Count how many times a script has been run + loop through

Still haven't figured it out.. Anyone?
by Johana
01 Dec 2017, 10:31
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 2338

Re: Count how many times a script has been run + loop through

Hello Odlanir! I've used your code and now the past 10 Days I've tried to read about each line in help forums and so on trying to understand it. Very hard to understand, but I'm getting there. This is doing almost exactly as I want. However I would like to my self tell it how to sum on each row. I.e...
by Johana
29 Nov 2017, 08:31
Forum: Ask For Help
Topic: COM: Works only when I change function name
Replies: 10
Views: 1791

Re: COM: Works only when I change function name

I removed quit, and so far it seems working. But is there no way to tell it "when it's fully loaded, wait a Little, then quit" ?
by Johana
27 Nov 2017, 09:47
Forum: Ask For Help
Topic: COM: Works only when I change function name
Replies: 10
Views: 1791

Re: COM: Works only when I change function name

Blackholyman wrote:Well it did make the function local

For your other issue you need to give the browser time to do the click before you ask it to quit
I tried with sleep, 4000. Still not working. Any other suggestions?
by Johana
22 Nov 2017, 09:53
Forum: Ask For Help
Topic: COM: Works only when I change function name
Replies: 10
Views: 1791

Re: COM: Works only when I change function name

Nope. Doesn't work :( :( Your IEload function is global so the wb variable inside the function is not safe listlines #persistent #Singleinstance, force #NoEnv XwbX := ComObjCreate("InternetExplorer.Application") XwbX.Visible := false XwbX.Navigate("https://website.com") IELoad(XwbX) XwbX.document.Ge...
by Johana
21 Nov 2017, 15:38
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 2338

Re: Count how many times a script has been run + loop through

Seems to work like a charm! This code is however above my understanding so not quite sure what it's doing so I need help :) The script is creating 1 file for each script and user. PERFECT! Now I want a gui to display to the user how many time he/she used ALL Scripts, but ONLY those he/she have used....
by Johana
20 Nov 2017, 06:55
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 2338

Re: Count how many times a script has been run + loop through

Thanks for all the answers! I'll try this and get back to you!
by Johana
20 Nov 2017, 06:50
Forum: Ask For Help
Topic: COM: Works only when I change function name
Replies: 10
Views: 1791

Re: COM: Works only when I change function name

Blackholyman wrote:Your IEload function is global so the wb variable inside the function is not safe
Thanks! I'll try to remove it and see if it works.
by Johana
20 Nov 2017, 03:30
Forum: Ask For Help
Topic: Count how many times a script has been run + loop through
Replies: 12
Views: 2338

Count how many times a script has been run + loop through

I have a brilliant (at least in my head) idea! I have now around 30 scritps that are used through a menu by our entire animal rescure hospice (yes! I AM PROUD!). An idea struck me that I would like to implement. I guess it has todo with IniWrite somehow. The scripts are run over a network. What I wa...

Go to advanced search