Select(0) not working on onStart script command
- Dominant language
- C++
- Stars
- 12.3k
- Forks
- 593
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 9
Description
**Describe the bug**
When CopyQ starts the clipboard appears as 'EMPTY' so I tried to create a script command that runs at start and select the first entry to clipboard but nothing happen. The script is as follow:
```
var onStartPrevious = global.onStart
global.onStart = function() {
onStartPrevious()
select(0)
}
```
**To Reproduce**
1. Paste this command in commands window:
```
[Command]
Command="
var onStartPrevious = global.onStart
global.onStart = function() {
onStartPrevious()
select(0)
}"
Icon=1
IsScript=true
Name=Select first entry on Start
```
2. Close and open CopyQ.
3. Clipboard is 'EMPTY'
**Expected behavior**
First entry should get selected and show in 'Clipboard'.
**Screenshots**


**Version, OS and Environment**
CopyQ Clipboard Manager 8.0.0~mantic
Qt: 5.15.10
KNotifications: 5.110.0
Compiler: GCC
Arch: x86_64-little_endian-lp64
OS: Ubuntu 23.10
**Additional context**
Not sure if related to this [bug](https://github.com/hluk/CopyQ/issues/2693)
Tried changing 'select(0)' with 'popup('Hello, World!');' and it works fine.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.